//public CustomerRepository(IOptions<ApplicationString> dbSettings)
 public CustomerRepository(CustomerManagementContext customerManagementContext)
 {
     //_connectionStrings = dbSettings;
     //_context = new CustomerManagementContext(_connectionStrings.Value.DB);
     //_context = new CustomerManagementContext("Server=tcp:devserver4.database.windows.net;Initial Catalog=CustomerManagement;User ID=M1043027;Password=Azuredb1@;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;");
     _context = customerManagementContext;
 }
Esempio n. 2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env,
                              CustomerManagementContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseAuthentication();
            app.UseRouting();
            app.UseStaticFiles();

            app.UseMvc(ConfigureRoutes);

            //app.UseEndpoints(endpoints =>
            //{
            //    endpoints.MapGet("/", async context =>
            //    {
            //        await context.Response.WriteAsync("Hello World!");
            //    });

            //    endpoints.MapControllerRoute(
            //       name: "default",
            //       pattern: "{controller=Home}/{action=Index}/{id?}");

            //    endpoints.MapRazorPages();
            //});

            //DBInitializer.Initialize(context);
        }
Esempio n. 3
0
 public UserController(CustomerManagementContext context, ITokenService tokenService)
 {
     _context      = context;
     _tokenService = tokenService;
 }
Esempio n. 4
0
 public CustomerRepository(IOptions <ApplicationString> dbSettings)
 {
     _connectionStrings = dbSettings;
     //_context = new CustomerManagementContext(_connectionStrings.Value.DB);
     _context = new CustomerManagementContext("Server=tcp:restaurent.database.windows.net;Initial Catalog=CustomerManagement;Persist Security Info=False;User ID=M1054315;Password=Venky@1991;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;");
 }
Esempio n. 5
0
 protected BaseService(CustomerManagementContext customerManagementContext)
 {
     _managementContext = customerManagementContext;
 }
 public UserDataAccess(IOptions <ApplicationString> dbSettings)
 {
     _connectionStrings = dbSettings;
     _context           = new CustomerManagementContext(_connectionStrings.Value.DB);
 }
 public CustomerRepository(IOptions <ApplicationString> dbSettings)
 {
     _connectionStrings = dbSettings;
     //_context = new CustomerManagementContext(_connectionStrings.Value.DB);
     _context = new CustomerManagementContext(_connectionStrings.Value.DB);
 }
Esempio n. 8
0
 /// <summary>
 /// initialized the object along with the database context
 /// </summary>
 public LoggingRespository(string connectionString)
 {
     context = new CustomerManagementContext(connectionString);
 }
 public RepositoryLayer(CustomerManagementContext _context)
 {
     context = _context;
 }
Esempio n. 10
0
 public CustomerService(CustomerManagementContext context)
 {
     _context = context;
 }