File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . ComponentModel . DataAnnotations ;
4+ using System . Data . Entity ;
5+ using System . Linq ;
6+
7+ namespace UnitTest . Database
8+ {
9+ public class RandomTestDb : DbContext
10+ {
11+ public DbSet < Category > Categories { get ; set ; }
12+ public DbSet < Product > Products { get ; set ; }
13+ }
14+
15+ public class Category
16+ {
17+ [ MaxLength ( 36 ) ]
18+ public string Id { get ; set ; }
19+ public DateTime Created { get ; set ; }
20+ [ Required ]
21+ [ MaxLength ( 20 ) ]
22+ public string Name { get ; set ; }
23+ }
24+
25+ public class Product
26+ {
27+ public Guid Id { get ; set ; }
28+ public DateTime Created { get ; set ; }
29+ [ Required ]
30+ [ MaxLength ( 20 ) ]
31+ public string Name { get ; set ; }
32+ }
33+ }
Original file line number Diff line number Diff line change 6969 <Compile Include =" Client\GlobalTest.cs" />
7070 <Compile Include =" Client\HttpHelper.cs" />
7171 <Compile Include =" Client\RandomTest.cs" />
72+ <Compile Include =" Database\RandomTestDb.cs" />
7273 <Compile Include =" Properties\AssemblyInfo.cs" />
7374 </ItemGroup >
7475 <ItemGroup >
You can’t perform that action at this time.
0 commit comments