BestQA.MockRepository/Mapping/UserMap.cs
(完整代码) 771Busing System.Data.Entity.ModelConfiguration;
using BestQA.QueryService.DTOs;
namespace BestQA.Repository.Mapping
{
public class UserMap : EntityTypeConfiguration<UserDTO>
{
public UserMap()
{
// Primary Key
this.HasKey(t => t.Id);
// Properties
this.Property(t => t.UserName)
.IsRequired()
.HasMaxLength(50);
this.Property(t => t.Money)
.IsRequired();
// Table & Column Mappings
this.ToTable("User");
this.Property(t => t.UserName).HasColumnName("UserName");
this.Property(t => t.Money).HasColumnName("Money");
this.Property(t => t.Id).HasColumnName("Id");
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
