예제 #1
0
        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 Postgis​Point(33.676244d, -117.867390)
                    {
                        SRID = 4326
                    }
                },
예제 #2
0
 public TitanRepository(TitanContext ctx)
 {
     _ctx = ctx;
 }
예제 #3
0
 public DataBaseInitService(TitanContext ctx)
 {
     _ctx = ctx;
 }
예제 #4
0
 public UserService(TitanContext context, IOptions <ConnectionStringOptions> connStrOptions)
 {
     _context        = context;
     _connStrOptions = connStrOptions;
 }