示例#1
0
        public static void Initialize(IServiceProvider serviceProvider)
        {
            using (var context = new OT2Context(
                       serviceProvider.GetRequiredService <
                           DbContextOptions <OT2Context> >()))
            {
                // Look for any movies.
                if (context.Emp.Any())
                {
                    return;   // DB has been seeded
                }

                context.Emp.AddRange(
                    new Emp
                {
                    FirstName      = "sss",
                    LastName       = "sss",
                    Gender         = "ss",
                    Birthday       = "sss",
                    Email          = "sss",
                    Line           = "sss",
                    Call           = "sss",
                    Addr           = "sss",
                    Image          = "sss",
                    Date           = DateTime.Parse("1989-2-12"),
                    Status         = "ss",
                    CompanyName    = "ss",
                    DepartmentName = "ss",
                    LocationName   = "sss",
                    EmployeeTypeID = "ss",
                    PositionID     = "ssss"
                }



                    );
                context.SaveChanges();
            }
        }
示例#2
0
 public DeleteModel(OT2.Models.OT2Context context)
 {
     _context = context;
 }
示例#3
0
 public IndexModel(OT2.Models.OT2Context context)
 {
     _context = context;
 }
示例#4
0
 public EditModel(OT2.Models.OT2Context context)
 {
     _context = context;
 }
示例#5
0
 public DetailsModel(OT2.Models.OT2Context context)
 {
     _context = context;
 }
示例#6
0
 public CreateModel(OT2.Models.OT2Context context)
 {
     _context = context;
 }