#entityframework — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #entityframework, aggregated by home.social.
-
From the .NET blog...
In case you missed it earlier...
.NET 11 Preview 4 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-4/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured -
From the .NET blog...
In case you missed it earlier...
.NET 11 Preview 4 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-4/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured -
From the .NET blog...
In case you missed it earlier...
.NET 11 Preview 4 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-4/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured -
From the .NET blog...
In case you missed it earlier...
.NET 11 Preview 4 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-4/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured -
From the .NET blog...
In case you missed it earlier...
.NET 11 Preview 4 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-4/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured -
From the .NET blog...
.NET 11 Preview 4 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-4/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured -
From the .NET blog...
.NET 11 Preview 4 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-4/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured -
From the .NET blog...
.NET 11 Preview 4 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-4/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured -
From the .NET blog...
.NET 11 Preview 4 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-4/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured -
From the .NET blog...
.NET 11 Preview 4 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-4/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured -
From the archives...
Past Is Not Prologue - #ScifiDevCon2025
https://barretblake.dev/posts/development/2025/05/past-is-not-prologue-scifidevcon2025/ #youtube #EntityFramework #SciFiDevCon -
From the archives...
Past Is Not Prologue - #ScifiDevCon2025
https://barretblake.dev/posts/development/2025/05/past-is-not-prologue-scifidevcon2025/ #youtube #EntityFramework #SciFiDevCon -
From the archives...
Past Is Not Prologue - #ScifiDevCon2025
https://barretblake.dev/posts/development/2025/05/past-is-not-prologue-scifidevcon2025/ #youtube #EntityFramework #SciFiDevCon -
From the archives...
Past Is Not Prologue - #ScifiDevCon2025
https://barretblake.dev/posts/development/2025/05/past-is-not-prologue-scifidevcon2025/ #youtube #EntityFramework #SciFiDevCon -
From the archives...
Past Is Not Prologue - #ScifiDevCon2025
https://barretblake.dev/posts/development/2025/05/past-is-not-prologue-scifidevcon2025/ #youtube #EntityFramework #SciFiDevCon -
From the .NET blog...
In case you missed it earlier...
.NET 11 Preview 3 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-3/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured -
From the .NET blog...
.NET 11 Preview 3 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-3/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured -
New post from my blog...
In case you missed it earlier...
EF Core Migrations Best Practices
https://barretblake.dev/posts/development/2026/04/ef-migrations-best-practices/ #entityframework -
New post from my blog...
EF Core Migrations Best Practices
https://barretblake.dev/posts/development/2026/04/ef-migrations-best-practices/ #entityframework -
#databases #sqlserver #technicalDebt #entityFramework
So... At work, our product has many data grids, and uses Entity Framework, most of the grids are paged.
Paging is done viaawait orderedQuery. Skip((page-1)*pageSize). Take(pageSize).TolistAsync()
Page 2 loads had always been slow. EF "optimises" the generated query to use one parameter for the second page because page 2 is... .Skip((1-1)*pageSize).Take(pageSize) ...
Both resolve to the same value. EF says "same value, same parameter!" Find whatever.
Except... SQL server builds and uses a different (and more costly) plan for the resultingOFFSET \@p ROWS LIMIT \@pthat is consistently worse than it they had didn't values that producesOFFSET \@p1 ROWS LIMIT \@p2Apparently it's been a known problem for a long time.
Until someone as dumb as me asks... Why not Skip as much as normal and Take one extra then don't use it the extra.
(await orderedQuery. Skip((page-1)*pageSize). Take(pageSize+1).TolistAsync()).Take(pageSize)/1
-
From the archives...
KCDC 2024 Slidedeck
https://barretblake.dev/posts/conferences/2024/kcdc-2024-slidedeck/ #efcore #entityframework #slides -
Authored my first blog post 🎉
It's about domain-event dispatching using an outbox pattern with EF and MediatR.
Any feedback good or critical would be greatly appreciated 🙏
-
T-SQL в .NET Core EF Core: Гибридный подход к производительности и гибкости (Переосмысление с учетом обсуждения)
Секретное оружие в .NET Core: Почему вы игнорируете мощь T-SQL? Ваши LINQ-запросы становятся громоздкими? Производительность упирается в потолок? Возможно, вы упускаете нечто важное. Эта статья — приглашение взглянуть на привычные инструменты под новым углом. Мы исследуем гибридный подход, который позволяет использовать весь потенциал Microsoft SQL Server, выходя за рамки стандартного взаимодействия через EF Core. Узнайте, как T-SQL может упростить сложные задачи, повысить производительность и сделать вашу архитектуру более гибкой. Это не просто технический трюк, а переосмысление роли СУБД в современном приложении. Готовы узнать, как использовать "скрытые" возможности MSSQL и почему это может быть именно то, что нужно вашему проекту? Читать об этом
https://habr.com/ru/articles/914378/
#net #net_core #ef #entityframework #linq #tsql #sql #mssql #mssqlserver #database_development
-
T-SQL в .NET Core EF Core: Гибридный подход к производительности и гибкости
В мире .NET разработки, работа с базами данных – неотъемлемая часть. Entity Framework Core (EF Core) предоставляет удобный способ взаимодействия с данными, но при работе с SQL Server, особенно в сложных сценариях, LINQ запросы могут уступать в производительности и гибкости T-SQL. Статья рассматривает эту дилемму, предлагая гибридный подход. Мы погрузимся в проблему: как эффективно использовать мощь T-SQL, не отказываясь от преимуществ EF Core? Обсудим интеграцию T-SQL через Raw SQL, Views, UDF и Stored Procedures. Раскроем лучшие практики: разделение ответственности, оптимизацию запросов, безопасность и тестирование. Поймем, как сочетать удобство ORM с производительностью SQL Server, применяя Data-Driven Design и, при необходимости, Domain-Driven Design. Статья – руководство для .NET разработчиков, стремящихся к оптимальному балансу между производительностью, гибкостью и удобством разработки при работе с SQL Server и EF Core. Читать об этом
https://habr.com/ru/articles/906522/
#net #net_core #ef #entityframework #linq #tsql #sql #mssql #mssqlserver #database_development
-
https://antondevtips.com/blog/how-to-increase-ef-core-performance-for-read-queries-in-dotnet?utm_source=linkedin&utm_medium=social&utm_campaign=13-01-2026 - Speed up #EntityFramework Core in #dotNET. Nice post Anton Martyniuk.
-
Blogged: Entity Framework Core 10 provider for Firebird is ready
-
Coming up next month (February 9-11th), I'm holding my "ASP․NETCore 10 and Vue.js From Scratch" course in The Hague, NL. Limited seating for this three day class on #aspnetcore, #entityframework, and #vuejs. Check it out here:
-
Зачем вообще использовать ORM?
Разработка софта всегда была поиском баланса между разными аспектами, вроде скорости разработки (как быстро ты выкатываешь новые фичи), производительности приложения, потребления им памяти, красотой интерфейса и отполированностью логики. В большинстве случаев скорость разработки важнее, чем производительность и потребление памяти. ORM - это как раз инструмент, экономящий время разработки. Но за счёт чего?
-
https://www.sea-ql.org/SeaORM/docs/generate-entity/entity-first/
>This is where SeaORM shines: it automatically builds a dependency graph from your entities and determines the correct topological order to create the tables, so you don't have to keep track of them in your head.
Awesome. It sounds like #SeaORM might be Rust's equivalent of #EntityFramework from the #dotnet world. I'm fiddling with a local application that stores data in a #sqlite database, and have been looking at various crates that could handle schema and entity management. While SeaORM bills itself as being meant for web applications, I'm not seeing anything that would preclude using it in local apps.
-
EFCore.Visualizer – View Entity Framework Core query plan inside Visual Studio.
-
#AspNetCore, for an #Sqlite database.
- Vacuum on startup/shutdown,
- offline by user running vacuum command through Sqlite CLI,
- or on regular intervals during runtime? -
So many SaaS applications are simply single-page applications wrapping a database. So why not learn the #dotnet SPA framework, #blazor and the popular #EntityFramework?
-
Curious about when to choose between Dapper and Entity Framework for your .NET project? 🤔
If you need high-performance, lightweight data access, go with Dapper! 💪 For more complex data models and relationships go for Entity Framework.
#Dapper #EntityFramework #dotnet -
One thing is for sure, version controlling a #SQL database is not easy.
There's a bit more ceremony involved, but it looks like #microsoft does have a recommendation. Check it out.https://www.youtube.com/watch?v=xzqpf0Nq06o
#sql #git #dotnet #entityframework -
Announcing the General Availability of the Couchbase EF Core Provider | by Matthew Groves.
https://www.couchbase.com/blog/ef-core-provider-for-couchbase-general-availability/
-
via @dotnet : .NET and .NET Framework April 2025 servicing releases updates
https://ift.tt/WRnZhzB
#DotNet #DotNetFramework #April2025 #SecurityUpdates #CVE #ReleaseNotes #ASPNetCore #EntityFramework #SDK #Winforms #SoftwareDevelopment #Programming #DevCommunity… -
https://learn.microsoft.com/en-us/ef/core/dbcontext-configuration/#use-a-dbcontext-factory - want to use an #EntityFramework DBContext in a singleton? In #ASPnet's DI, rig up a factory: `services.AddDbContextFactory<ApplicationDbContext>(o => o.UseSqlServer("Server=...`
-
Step by step, it became harder to install an older program that I created years ago on current Windows systems.
Now, I decided to redo major parts of it, e.g., upgrade from .net framework from 4.6 to something more current, upgrade from entity framework 4 to something more current, ...
There are lots of changes to something that was running for years without problems, but the environment changed.
#programming #dotnet #entityframework -
Still thinking about upgrading your skills to #aspnetcore. My newly updated Pluralsight course covers #dotnet8, Razor Pages, #rest APIs, #minimalApis, #fluentvalidation, #entityframework, and #vue! Watch it here:
-
via @dotnet : .NET and .NET Framework March 2025 servicing releases updates
https://ift.tt/rLuXd7N
#DotNet #DotNetFramework #March2025 #ServicingUpdates #SecurityImprovements #CVE #ReleaseNotes #ASPNetCore #EntityFramework #SoftwareUpdates #TechNews #DeveloperCo… -
Немного про DDD: Реализация событий предметной области в .NET
Всем привет! Предметно-ориентированное проектирование, на мой взгляд, является недопонятым подходом, о котором многие говорят, но немногие его действительно применяют. Одним из относительно простых в реализации и полезных в архитектурном смысле паттернов, на мой взгляд, являются события предметной области (Domain Events) . В данной статье я бы хотел рассказать о возможных вариантах реализации этого шаблона DDD с использованием .NET.
https://habr.com/ru/articles/846796/
#События_предметной_области #ddd #entityframework #domain_events #domain_driven_design
-
I can understand why people would hate #entityframework after a few years working on an older #dotnetframework version. Updating the edmx and regenerating code is painful. It doesn't help that the tooling isn't great either. I spent 3 hours trying to get VS 2022 to correctly generate code and edmx changes from a database change. This should have taken minutes.
The newer #dotnet versions of EF Core are so much better.
-
Generic Repository Pattern in C#
Have you ever dreaded writing the same boilerplate repository code repeatedly? You’re not alone; I will share my implementation of the Code First Generic Repository Pattern in C#. I will only include some of the code because it will make the post incredibly long. At the end of the post, I will share a Goal donation to post a Git download link so you can take it for a spin. As a bonus, the repository uses Code First and Unit of Work.
Generic Repository Pattern in C#
Let’s begin with the Entity interface. The IEntity interface is a typical pattern used in software development to define a contract for entities, typically in the context of data access and persistence. It usually includes a property for the entity’s unique identifier. The Generic Type: The IEntity interface uses a generic type parameter TKey to allow flexibility in the type of the identifier (e.g., int, Guid, string). The ID property will identify each entity uniquely. Feel free to read more about the implementation at the entity framework core generic repository and Structured Query IEntity.
public interface IEntity<TKey>{ TKey Id { get; set; }}You might find the following definition of the generic repository pattern on the interwebs.
The Generic Repository pattern in C# is a design pattern that abstracts the application’s data layer, making it easier to manage data access logic across different data sources. It aims to reduce redundancy by implementing typical data operations in a single, generic repository rather than having separate repositories for each entity type.
public interface IGenericRepository<TEntity, TKey> where TEntity : class, IEntity<TKey>{ void Delete(TEntity entityToDelete); TEntity? GetFirstOrDefault(Expression<Func<TEntity, bool>> predicate); void Update(TEntity entityToUpdate); void Save(); void Dispose();}The interface header has two generic types. TEntity is the domain class, and the TKey is the ID type, int, or string. Note that IEntity abstracts away the type TKey. It looks complex for the moment, but you will see benefits later.
Moving away from the Generic Repository, let’s focus on the pattern of the Unit of Work. According to Copilot:
The Unit of Work is a design pattern used in software development to manage and coordinate changes to a database. It ensures that all operations within a single business transaction are treated as a single unit, which means they either all succeed, or all fail together. This helps maintain data integrity and consistency.
public interface IUnitOfWork : IDisposable{ IGenericRepository<TEntity, TKey> Repository<TEntity, TKey>() where TEntity : class, IEntity<TKey>; void Save(); Task<int> SaveAsync();}The Unit of Work will allow us later to inject it as a service for any repository. If you inspect the interface closely, you will notice it has three fields. The most vital of the three is the Repository. The method returns a domain of type repository and key. You can specify the type when using it.
Moving on to the Code First portion, we must tell Entity Framework how to build our database. To do so, we can create a “BloggingContext”.
public class BloggingContext: DbContext{ // Use design time factory public BloggingContext(DbContextOptions<BloggingContext> dbContextOptions) : base(dbContextOptions) { } public DbSet<Blog> Blogs { get; set; } public DbSet<Post> Posts { get; set; }}If you inspect the code closely, you will notice that we inherited from DbContext, which allows us to manipulate the database. The DbContext will also enable us to use DbSets and CRUD methods. You can read more about DbContext Class on the Microsoft website.
Before using your Database Context with Code, you must set up migrations. Migrations allow you to evolve your database as you code and change the schema. I recommend you read up on Migrations managing schemas because it has excellent examples to help you start quickly.
At the high level, in Visual Studio, open up the Tools menu, then the NuGet Package Manager menu, followed by the Console. In the Console, you must install the following package.
Install-Package Microsoft.EntityFrameworkCore.Tools
The Microsoft.EntityFrameworkCore.Tools will allow you to make the following commands.
Add-Migration InitialCreate
Update-Database
Meanwhile, you might want to consider making a DesignTimeDbContextFactory because it aids in setting up the connection string for the database.
public class DesignTimeDbContextFactory : IDesignTimeDbContextFactory<BloggingContext>{ public BloggingContext CreateDbContext(string[] args) { // Build configuration IConfigurationRoot configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.Development.json") .Build(); // Get connection string var connectionString = configuration.GetConnectionString("DefaultConnection"); var optionsBuilder = new DbContextOptionsBuilder<BloggingContext>(); optionsBuilder.UseSqlServer(connectionString); return new BloggingContext(optionsBuilder.Options); }}I’m considering publishing the fully working example on Git with the following components.
- Services
- Domain
- Interfaces
- Repository
- Console App with basic CRUD operations
- Dependency Injection
Current Donation Amount
$2.41 – PayPal fees 🤑
Note that the donation amount is being updated manually on my end. I have asked WordPress; see the image for details. I will list your name and last name initials. If you like the website backlink, donate $10 or more, and let me know in the comments your web address.
Donate to Goal of $666 to unlock Code First Generic Repository Pattern 🚀✨
Upon reaching the $666 Goal, I will share the code.
$3.00
Donators List
- Nicholas S 8.20.2024
#CodeEfficiency #CodeFirst #CRUDOperations #CSharp #DatabaseManagement #DbContext #DependencyInjection #DesignPatterns #EntityFramework #GenericRepository #Migrations #RepositoryPattern #SoftwareDevelopment #UnitofWork