Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
 public DocumentsController(ApiExamplesContext context)
 {
     _context = context;
 }