File tree Expand file tree Collapse file tree 4 files changed +60
-0
lines changed Expand file tree Collapse file tree 4 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 10
10
<PackageReference Include =" Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version =" 1.9.10" />
11
11
</ItemGroup >
12
12
13
+ <ItemGroup >
14
+ <Folder Include =" Data\" />
15
+ </ItemGroup >
16
+
13
17
14
18
15
19
</Project >
Original file line number Diff line number Diff line change
1
+ using System . ComponentModel . DataAnnotations ;
2
+
3
+ namespace AspnetRunBasics . Entities
4
+ {
5
+ public class Category
6
+ {
7
+ public int Id { get ; set ; }
8
+
9
+ [ Required , StringLength ( 80 ) ]
10
+ public string Name { get ; set ; }
11
+ public string Description { get ; set ; }
12
+ public string ImageName { get ; set ; }
13
+ }
14
+ }
Original file line number Diff line number Diff line change
1
+ using System . ComponentModel . DataAnnotations ;
2
+
3
+ namespace AspnetRunBasics . Entities
4
+ {
5
+ public class Contact
6
+ {
7
+ public int Id { get ; set ; }
8
+
9
+ [ Required ]
10
+ public string Name { get ; set ; }
11
+
12
+ [ Phone ]
13
+ [ Required ]
14
+ public string Phone { get ; set ; }
15
+
16
+ [ Required ]
17
+ public string Email { get ; set ; }
18
+
19
+ [ MinLength ( 10 ) ]
20
+ [ Required ]
21
+ public string Message { get ; set ; }
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ using System . ComponentModel . DataAnnotations ;
2
+
3
+ namespace AspnetRunBasics . Entities
4
+ {
5
+ public class Product
6
+ {
7
+ public int Id { get ; set ; }
8
+
9
+ [ Required , StringLength ( 80 ) ]
10
+ public string Name { get ; set ; }
11
+
12
+ public string Summary { get ; set ; }
13
+ public string Description { get ; set ; }
14
+ public string ImageFile { get ; set ; }
15
+ public double Price { get ; set ; }
16
+ public int CategoryId { get ; set ; }
17
+ public Category Category { get ; set ; }
18
+ }
19
+ }
You can’t perform that action at this time.
0 commit comments