// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, AngularContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseCors("MyPolicy"); app.UseHttpsRedirection(); app.UseAuthentication(); app.UseMvc(); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "AngularProject API v1"); }); DBInitializer.Initialize(context); }
static void Main(string[] args) { var db = new AngularContext(); var uow = new UnitOfWork(db); var repo = new Repository <UserAccount>(db, uow); // var serv = new Service<UserAccount>(repo); var usrv = new UserAccountService(new UserAccountRepository(repo)); // usrv.CreateAccount("default", "*****@*****.**", "*****@*****.**", "*****@*****.**"); // uow.SaveChanges(); var user = usrv.GetByEmail("default", "*****@*****.**"); System.Console.WriteLine(user.ID); System.Console.ReadLine(); }
public RepositoryBase(AngularContext context) { Db = context; }
public PollController(AngularContext context) { _context = context; }
public HomeController(ILogger <HomeController> logger, AngularContext context) { _logger = logger; _context = context; }
public ContatoRepository(AngularContext Db) : base(Db) { }
public GebruikerController(AngularContext context) { _context = context; }
public StemController(AngularContext context) { _context = context; }
public CategoriaRepository(AngularContext Db) : base(Db) { }
public void RollBack() { Db.Dispose(); Db = null; Db = new AngularContext(); }
public UnitOfWorkService() { Db = new AngularContext(); _services = new Dictionary <Type, object>(); _repositories = new Dictionary <Type, object>(); }
public UnresolvedState(string name, AngularContext context) { this.Name = name; this.context = context; }
public GebruikerService(IOptions <AppSettings> appsettings, AngularContext angularContext) { _appSettings = appsettings.Value; _angularContext = angularContext; }
public ProdutoRepository(AngularContext Db) : base(Db) { }
public void Dispose() { Db.Dispose(); Db = null; }
public UsuarioRepository(AngularContext Db) : base(Db) { }
public VriendController(AngularContext context) { _context = context; }
public AuthenticationController(IGebruikerService gebruikerService, AngularContext context) { _gebruikerService = gebruikerService; _context = context; }
public AntwoordController(AngularContext context) { _context = context; }