private void SeedLocations(DoctorHouseContext context) { var locations = new List <Location>() { new Location { Name = "Colombia" }, new Location { Name = "Argentina" } }; context.AddRange(locations); context.SaveChanges(); }
private void SeedUsers(DoctorHouseContext context) { var users = new List <User>() { new User { Name = "Test user", Email = "*****@*****.**", CreationDate = DateTime.UtcNow, Password = "******", //123456 Salt = "F}S2¡7", LocationId = 1 } }; context.AddRange(users); context.SaveChanges(); }
private void SeedNotifications(DoctorHouseContext context) { var notifications = new List <Notification>(); foreach (var notification in Enum.GetValues(typeof(NotificationType))) { var type = (NotificationType)notification; notifications.Add(new Notification { Id = Convert.ToInt32(type), Name = type.ToString(), EmailHtml = type.ToString(), EmailSubject = type.ToString(), IsEmail = true, Active = true }); } context.AddRange(notifications); context.SaveChanges(); }
private void SeedRequests(DoctorHouseContext context) { var requests = new List <Request>() { new Request { CreationDate = DateTime.UtcNow, Deleted = false, Description = "description", EndDate = DateTime.UtcNow, GuestType = GuestType.MedicalStaff, PlaceId = 1, StartDate = DateTime.UtcNow, Status = StatusType.Approved, UserRequesterId = 1 } }; context.AddRange(requests); context.SaveChanges(); }
private void SeedPlaces(DoctorHouseContext context) { var places = new List <Place>() { new Place { Active = true, Address = "address", CreationDate = DateTime.UtcNow, Description = "description", GuestsAllowed = 1, Latitude = 1, Longitude = 1, UserId = 1, LocationId = 1, Phone = "123456" } }; context.AddRange(places); context.SaveChanges(); }