public CategoriesTests() { Linq2DbMap.Map(); MapperRegistrar.Register(); _categoriesDatabase = new CategoriesDatabase("Categories"); _repository = new Repository(_categoriesDatabase); }
public void Configuration(IAppBuilder appBuilder) { Linq2DbMap.Map(); MapperRegistrar.Register(); var httpConfiguration = GlobalConfiguration.Configuration; IoCRegistrar.Register(httpConfiguration); httpConfiguration.Filters.Add(new DefaultExceptionFilterAttribute()); GlobalConfiguration.Configure(WebApiConfig.Register); httpConfiguration.EnsureInitialized(); httpConfiguration .EnableSwagger(c => c.SingleApiVersion("v1", "Category Viewer")) .EnableSwaggerUi(); appBuilder.UseWebApi(httpConfiguration); }