Inject EntityFramework DbContext in a .NET 6 Azure Function
Where do I have to put the DbContext in a .NET 6 Azure Function? builder.Services.AddDbContext
Working of HasComputedColumnSql() method in EF Core
I have configured the updatedAt property as shown below. I expected that the updatedAt value of the corresponding row alone will change when inserting or updating. But when tried this it is updating entire column i.e all the rows of the UpdatedAt are…
How can I address Entity Framework context disposal issues within IIS Application Pool on an Azure VM hosting an MVC application?
I am encountering an issue with the automatic disposal of the Entity Framework context within the IIS App Pool on my Azure Virtual Machine that is hosting an MVC application. The problem manifests as errors occurring on nearly all pages after a certain…
Migration problem with immutable complex type entity for Entity Framework Core 8
I am using EF Core 8 in my project. I am trying to use an immutable complex-type entity. Here is my code: [ComplexType] public class Address(string line1, string? line2, string city, string country, string postCode) { [MaxLength(250)] …
How to fix error occurred during the pre-login handshake after upgrading SqlClinet
I upgraded project from .NET 6 to .NET 8, along with the packages. Sql Client is upgraded from 2.1.4 to 5.1.1 version contained in EF Core 8.0.1 package. We are using Azure DB, and there is no error in .NET 6 version with older SqlClinet. I'm aware of…
Niranjan Hiranandani | What are some popular plugins or extensions available for extending the capabilities of Framework?
Hello everyone, I'm Niranjan Hiranandani, I'm interested in learning more about the popular plugins or extensions available for extending the capabilities of Framework. If anyone has experience with any useful plugins or extensions, I would greatly…
.Net 8.0 Unable to install EntityFrameworkCore.Tools 8.0.2 from Nuget package manager
I have installed Visual Studio 2022 community edition, created a .Net Core Web API project and installed below 2 packages from Nuget package manager successfully. EntityFrameworkCore.SqlServer 8.0.2 EntityFrameworkCore 8.0.2 But, when I try to install…
Call new function based on returned value from database
Is there a way to call a function based on the output from the table? Meaning, I'm calling my table and there are at times the column may have a string in it like this { MM;Jan:Q1,Q2,Q3;Feb:Q1,Q2,A3;March;Apr;May.... }, this string can contain { MM, MMM,…
Entity Framework bulk functionalities (bulk insert,bulk delete)
I'm currently working on an enterprise project that requires some logic for bulk functionalities using Entity Framework. We found a couple of options but both are under licence: EF. Core.BulkExtensions…
Asp.net core 6.0 with MVC application - Unable to launch razor view which is having partial view after deploying in IIS 10 version on windows server 2016.
I have developed MVC web application with .net core 6.0 and I am using these technologies... Web API (Hosted on same server in IIS) Entity Framework SQL Server Razor views, JavaScript, JQuery & Bootstrap. Apexcharts Issue : After deploying in…
How to refactor this LINQ query for a reports dashboard in Blazor Server Application?
I am building a reports dashboard on my Blazor Server Application that displays the count of the last 3 years of "Completed" and "Continues" orders. The business rules are: Completed order means OrderDetails CompletionDateTime is…
Generating dynamic controllers with T4 templates in .NET
Hi Team, How can I create dynamic models and controllers using T4 templates in .NET? For instance, if I have tables in my SQL database like Employee, Salary, and Department, how can I use T4 templates to generate models and controllers based on those…
ADO entity data model is missing Visual studio 2022
I have installed entityframeworkcore 7.0.3 but ADO.net data model not show in data template
How can I add Microsoft EF Core to a .Net Maui solution?
What is the proper way to add Entity Framework Core to a .Net Maui solution? I did try to use .Net console project, but that didn't seem to work. I also tried to use a .Net Maui class project but that also didn't work. Sorry if it is a pretty basic…
Get the status of the publish/install WPF apps in known machines.
I have a WPF app with MVVM pattern and having entity framework is built. If the app is installed in different known machines then need to know the status(means each machine is running the WPF app or not) for every 5 minutes.
To get the status of the known machines(IP) in which WPF app is installed for every 5 minutes
We have WPF MVVM entity app with Oracle database is build and fine running. after publish this in Visual Studio 2022 and installed in different known machines(ip address). Then need to know whether the app is running in which machine/IP for every 5…
How can I exclude a property when using UpdateRange in Blazor Server application?
I am working on a Blazor Server application and want to know if there is a way to exclude a property when using the UpdateRange method. Below is the code I am using: public async Task UpdateReportAsync(List<OrderDetail> reports) { await using…
ArgumentNullException on add-migration com.
Hello, I'm still on my app dev which is a Blazor Wasm with it's API (developped with .Net core 7.0) and I try to create an EF Core migration, but I've got an issue. N.B.: I use environment variables to set my connection string (to change it…
what is the best and efficient way to show mixed tables in c# winform?
Hi every body. I work in database first projects and I make store procedure to show relational tables.mix 10-11 tables together and fetch it from the database with ado.net datareader and put it in a datatable and put this datatable in data source of a…
How to Fix Unhandled exception. System.TypeLoadException: Could not load type 'Microsoft.EntityFrameworkCore.Storage.IRelationalValueBufferFactoryFactory' from assembly 'Microsoft.EntityFrameworkCore.Relational, Version=8.0.0.0, Culture=neutral, PublicKey
I have upgraded my application from dotnet version 3 to 8.while i tried to run my application, i am facing this issue Unhandled exception. System.TypeLoadException: Could not load type…