-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathTestEntity.cs
More file actions
37 lines (26 loc) · 949 Bytes
/
TestEntity.cs
File metadata and controls
37 lines (26 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace PhenX.EntityFrameworkCore.BulkInsert.Tests.DbContext;
[PrimaryKey(nameof(Id))]
[Index(nameof(Name), IsUnique = true)]
[Table("test_entity")]
public class TestEntity : TestEntityBase
{
public int Id { get; set; }
[Column("name")]
[MaxLength(100)]
public string Name { get; set; } = string.Empty;
[Column("some_price")]
public decimal Price { get; set; }
[Column("the_identifier")]
public Guid Identifier { get; set; }
[Column("nullable_identifier")]
public Guid? NullableIdentifier { get; set; }
public DateTime Created { get; set; }
public DateTime? Modified { get; set; }
[Column("string_enum_value")]
public StringEnum StringEnumValue { get; set; }
[Column("num_enum_value")]
public NumericEnum NumericEnumValue { get; set; }
}