public static void Initialize(ApiExamplesContext context) { if (!context.Users.Any()) { var user = new User(); var userProfile = new OrganizationalProfile(); userProfile.Department = "Co Lab"; userProfile.Name = "Allan"; userProfile.Surname = "Pead"; user.Password = "******"; user.UserName = "******"; user.Profile = userProfile; context.Users.Add(user); context.SaveChanges(); } }
public DocumentsController(ApiExamplesContext context) { _context = context; }