protected void Application_Start() { //AreaRegistration.RegisterAllAreas(); var adminArea = new AdminAreaRegistration(); var adminAreaContext = new AreaRegistrationContext(adminArea.AreaName, RouteTable.Routes); adminArea.RegisterArea(adminAreaContext); var defaultArea = new DefaultAreaRegistration(); var defaultAreaContext = new AreaRegistrationContext(defaultArea.AreaName, RouteTable.Routes); defaultArea.RegisterArea(defaultAreaContext); //WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); VetDBDataContext data = new VetDBDataContext(); try { data.CreateDatabase(); } catch { } }
public SQLRepository() { dataBase = DependencyResolver.Current.GetService<VetDBDataContext>(); }
public SQLRepository() { dataBase = DependencyResolver.Current.GetService <VetDBDataContext>(); }