1
1
@model RowCountViewModel
2
2
3
3
<h4 >Random row count values</h4 >
4
- <dl class =" dl-horizontal" >
5
- <dt >The <code >DatabaseContext.RowCount</code > is</dt >
6
- <dd >@Model.DataContextCount.ToString( "###,###,###")</dd >
7
- <dt >The <code >Repository.RowCount</code > is</dt >
8
- <dd >@Model.RepositoryCount.ToString( "###,###,###")</dd >
9
- </dl >
4
+
5
+ <dl class =" row" >
6
+ <div class =" col" >
7
+ <dt >The <em >Current</em > <code >DatabaseContext.RowCount</code > is</dt >
8
+ <dd >@Model.Current.DataContext.ToString( "###,###,###")</dd >
9
+ </div >
10
+ <div class =" col" >
11
+ <dt >The <em >Current</em > <code >Repository.RowCount</code > is</dt >
12
+ <dd >@Model.Current.Repository.ToString( "###,###,###")</dd >
13
+ </div >
14
+ </dl >
15
+
16
+ <h4 >Previous values:</h4 >
17
+ @if (Model .Previous ? .Count > 1 )
18
+ {
19
+ @* Not ideal as itterates list twice, could be refactored*@
20
+ <dl class =" row" >
21
+ <div class =" col" >
22
+ <dt >The <em >Previous </em > <code >DatabaseContext .RowCount </code >s are </dt >
23
+ @foreach ( var counts in Model .Previous .Skip (1 ))
24
+ {
25
+ <dd class =" col" >@counts.DataContext.ToString( " ###,###,###" )</dd >
26
+ }
27
+ </div >
28
+ <div class =" col" >
29
+ <dt >The <em >Previous </em > <code >Repository .RowCount </code >s are </dt >
30
+ @foreach ( var counts in Model .Previous .Skip (1 ))
31
+ {
32
+ <dd class =" col" >@counts.Repository.ToString( " ###,###,###" )</dd >
33
+ }
34
+ </div >
35
+ </dl >
36
+ }
37
+ else
38
+ {
39
+ <p ><em >Hit refresh to generate new random values . Previous values will be listed here </em ></p >
40
+ }
0 commit comments