コード例 #1
0
        // 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);
        }
コード例 #2
0
ファイル: Startup.cs プロジェクト: xuzhg/OdataToEntity
        // 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());
        }
コード例 #3
0
        // 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);
        }
コード例 #4
0
ファイル: DbController.cs プロジェクト: genusP/OdataToEntity
 public DbController(OrderOeDataAdapter dataAdapter)
 {
     _dataAdapter = dataAdapter;
 }