skip to Main Content

Postgresql – Error on postgres migration files creation for dotnet

I read book Ultimate ASP.NET Core Web API. And there is a code first database creation using DbContext and IDesignTimeDbContextFactory<>. public class RepositoryContextFactory : IDesignTimeDbContextFactory<RepositoryContext> { public RepositoryContext CreateDbContext(string[] args) { var configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json") .Build(); var…

VIEW QUESTION

Can Asp.net create a unique database for each session?

I need a live demo for a product. Said product uses ASP.NET with Entity Framework. Currently I create a new in-memory database like this: var sqliteConnection = new SqliteConnection("DataSource=:memory:"); sqliteConnection.Open(); builder.Services .AddDbContextFactory<DatabaseContext> (options => options.UseSqlite(sqliteConnection, o => o.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery))); However, I…

VIEW QUESTION

.NET API threading issue (DBContext) – Asp.net

I am implementing an API and as part of it I have setup a custom .Net Middleware service extension UseRequestLoggingModdlewareExtension() that it run between the following: app.UseHttpsRedirection(); app.UseRequestLoggingModdlewareExtension(); app.UseRouting(); The code is simple, and just logs the output of the…

VIEW QUESTION
Back To Top
Search