예제 #1
0
        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 }
                );
        }
예제 #2
0
 public Repository(BRDContext entities)
 {
     Entities = entities;
 }