I am trying to inject some repository to a service and some services to a controller but I am using the DbContext is an assembly that is not the startup projec
I am trying to inject some repository to a service and some services to a controller but I am using the DbContext is an assembly that is not the startup projec
In trying to localize my application, the query string localization has worked and accept language header also working, but routing is not working. Here is my c
I'm creating a custom result filter that implements IAsyncResultFilter interface. In this filter I need the actual value returned by the Action, but I also need
I am hosting .net core applicaton on server but when I try to run the application it throws exception in windows logs: Unhandled exception. System.TypeInitializ
ServiceFilter we must register in Startup.cs. TypeFilter is injected by Microsoft.Extensions.DependencyInjection.ObjectFactory, we don't need to register that f
I'm facing problem while fetching data from an API in ASP.NET Core MVC controller (imdb api). The problem is I cannot deserialize the current JSON object into t
I am working on my first ASP.NET Core MVC application.What is the right way to specify the connection string in a ASP.NET Core MVC application with a sql server
I'm working on a project using ASP.NET Core 2.1 and EF Core 2.1. Although most of queries and commands use EF, some units needs to call stored procedures direct
I have multiple domains for a website: http://example.com http://www.example.com http://www.example.co.uk In production, I want the primary domain to be htt
I have a domain that has multiple sites underneath it. In my Startup.cs I have the following code public void ConfigureServices(IServiceCollection services) {
I have a domain that has multiple sites underneath it. In my Startup.cs I have the following code public void ConfigureServices(IServiceCollection services) {
I create a brand new ASP.NET Core MVC project using VS 2022 and .NET Core 6. VS will generate the base template and when I run it without touching any code, eve
I create a brand new ASP.NET Core MVC project using VS 2022 and .NET Core 6. VS will generate the base template and when I run it without touching any code, eve
I'm developing a test Project using asp.net core. For Connecting to database I'm using Entity framework. I add appsetings.json file to the project and change th
I'm newer to EF Core, so please forgive me if there is a trivial answer. Take this scenario.... A new web-application is being developed using the latest vers
In my ASP.NET Core MVC (2.2) app I have completed the setup for a global error handling class. I inject this class in the Startup.cs of my project by using app.
I am trying to scaffold and I get the following error: There was an error running the selected code generator: 'No parameterless constructor defined for typ
Is it possible to apply authorization against two or more policies? I am using ASP.NET 5, rc1. [Authorize(Policy = "Limited,Full")] public class FooBarControll
There has been a question at SO Why is Razor Pages the recommended approach to create a Web UI in Asp.net Core 2.0? where Steve Smith has kind