HangFire Database Tables - aspnetboilerplate

I have an asp.net core web application using the ABP Boilerplate framework. I've implemented Abp.HangFire.AspNetCore HangFire into the application. The web application has a database for the application's data. And by default, the HangFire database tables were created in the same database where the application's data resides.
We were wondering about using a separate database for HangFire. Are there any implications in doing that? Can that be done?

Change the db connection to your separate hangfire database in your host project.
GlobalConfiguration.Configuration.UseSqlServerStorage("<name or connection string>", options);
Check out for more infos:
https://docs.hangfire.io/en/latest/configuration/using-sql-server.html
Abp.HangFire.AspNetCore reference only Hangfire.AspNetCore without Hangfire.SqlServer. In your Abp host project you could handle Hangfire.SqlServer like in any other ASP .NET Core (.NET 5) project.
https://github.com/aspnetboilerplate/aspnetboilerplate/blob/511ed6389052b3850cb4c6b8d833fb192ec030ac/src/Abp.HangFire.AspNetCore/Abp.HangFire.AspNetCore.csproj

Related

Migrate entity framework core db first sql server to oracle

I have a .net core project where i am using entity framework db first connecting to sql server which is working fine, now i have similar set of tables in oracle can i just run the project by changing connection string and provider to oracle? Or any major rework is needed to make this work?
You need to regenerate the DbContext mappings using reverse engineering

Migrating existing ASP.NET Core 3 App to Orchard Core

I have a ASP.NET Core MVC Application that uses EntityFramework Core and Identity.
So far I have only 2 Connection Strings in Appsettings.json .
Context for Models and Context for Identity.
I would like to have a Database Connection string for each user group.
Does anybody have experience with Orchard Core Framework? It was linked on the Microsoft Documentation, because multi Tenant Database for each User is not supported by Identity.
Can anybody tell me if it is difficult to migrate an existing Project to this Framework?
I also read about Multi Tanent App on a blog form Gunnar Pipemann. This approach would be an alternative for me.
Maybe some of you have developed a similiar App with Asp.net Core MVC and can share their approach.

ASP.NET MVC6 without EF

is it possible to use MVC6 without using EF?. Wanted to confirm as we have a huge application in .NET 4.0 WebForms which uses a custom BL layer and DB Layer to talk to multiple databases ( SQL Server & PostgreSQL) seamlessly.
Thanks in advance.
yes it's possible. EF is just help you to call database

Using ASP.NET Identity with an Oracle database and thus Entity Framework 5

Is there any chance to use ASP.NET Identity with Entity Framework while connecting to an Oracle database?
The challenge seems to be some version conflicts:
The Oracle Data Provider for .NET only targets Entity Framework 5 but not Entity Framework 6.
The NuGet package Microsoft.AspNet.Identity.EntityFramework targets EF6, not EF5.
It's not the code first feature that troubles me. It's getting the connection up and running and reading my user identity data from the Oracle database that bugs me.
Any pointers are much appreciated.
The solution is, of course, in implementing an UserStore class for the IUserStore (and IUserPasswordStore and IUserClaimStore and whatever one needs) interfaces.
Therein, it's just plain EF5 code that queries and updates the ASP.NET Identity tables.
Using this, the UserManager works just fine for accessing all identity data.

Using ASP.NET Web Forms and MVC applications within the same solution

I have an ASP.NET Web Forms application in one project. Under the same solution I have two different projects: one Repository layer and one Service layer.
Eventually I will rewrite my ASP.NET Web Forms application in MVC, therefore I want to implement all the new functionality by using MVC.
I have to create a registration form for customers and at one point if a condition verifies, I have to bring the customer to another form and then back to the registration form.
Will it work if I create an MVC application project within the same solution? The application will also use the Service and Repository layers. What about the Session object?
Just add the MVC controllers/views to your Web Forms application. They can run side-by-side just fine. This will allow you to upgrade parts of the site to MVC while keeping your existing Web Forms pages running.
The web layer (which has both MVC and Web Forms) can still access all of your application framework logic (repository, service, session, etc...)
Scott Hanselman created a Nuget Package for easily upgrading your web forms app to Mvc 3:
http://nuget.org/packages/AddMvc3ToWebForms

Resources