// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddMvcCore(); _dataAdapter = new OrderOeDataAdapter(OdataToEntity.Test.Model.OrderContext.GenerateDatabaseName()); services.AddSingleton(_dataAdapter); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddMvcCore(); var dataAdapter = new OrderOeDataAdapter(true, true, null); services.AddOdataToEntity(dataAdapter, dataAdapter.BuildEdmModelFromEfCoreModel()); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddMvc(); services.AddSingleton <OeRouter>(); var dataAdapter = new OrderOeDataAdapter(Model.OrderContext.GenerateDatabaseName()); services.AddSingleton(typeof(Db.OeDataAdapter), dataAdapter); IEdmModel edmModel = dataAdapter.BuildEdmModelFromEfCoreModel(); services.AddSingleton(typeof(IEdmModel), edmModel); }
public DbController(OrderOeDataAdapter dataAdapter) { _dataAdapter = dataAdapter; }