public static void Register(HttpConfiguration config) { using (var Context = new BRDContext()) { Context.Database.CreateIfNotExists(); } // Web API configuration and services // Web API routes config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } ); }
public Repository(BRDContext entities) { Entities = entities; }