using EC.Entity.CameraInfo; using Microsoft.EntityFrameworkCore; #nullable disable namespace EC.Service.CameraInfo { public class UserInfoContext : BaseDbContext { public UserInfoContext() { } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { entity.HasKey(e => e.UserName); entity.ToTable("UserInfo"); entity.Property(e => e.UserName).HasColumnType("VARCHAR (20)"); entity.Property(e => e.UserAdmin).HasColumnType("VARCHAR (30)"); entity.Property(e => e.UserPwd).HasColumnType("VARCHAR (20)"); entity.Property(e => e.UserType).HasColumnType("VARCHAR (10)"); }); OnModelCreatingPartial(modelBuilder); } } }