public static void Initialize(TitanContext context) { context.Database.EnsureCreated(); // Look for any students. if (context.Users.Any()) { return; // DB has been seeded } var users = new User[] { new User { FirstName = "Carson", LastName = "Alexander", Email = "*****@*****.**", DateOfBirth = new DateTime(1999, 1, 1), Gender = Gender.Male, UserName = "******", Created = DateTime.UtcNow, Location = new PostgisPoint(33.676244d, -117.867390) { SRID = 4326 } },
public TitanRepository(TitanContext ctx) { _ctx = ctx; }
public DataBaseInitService(TitanContext ctx) { _ctx = ctx; }
public UserService(TitanContext context, IOptions <ConnectionStringOptions> connStrOptions) { _context = context; _connStrOptions = connStrOptions; }