//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; }
// 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); }
public UserController(CustomerManagementContext context, ITokenService tokenService) { _context = context; _tokenService = tokenService; }
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;"); }
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); }
/// <summary> /// initialized the object along with the database context /// </summary> public LoggingRespository(string connectionString) { context = new CustomerManagementContext(connectionString); }
public RepositoryLayer(CustomerManagementContext _context) { context = _context; }
public CustomerService(CustomerManagementContext context) { _context = context; }