EF Core 8 – RelationalConnectionDependencies does not contain a definition for ‘With’
I am upgrading a project from .NET Core 2.1 to .NET 8 and as part of that, I also need to upgrade Entity Framework Core to 8.0.
Does EF optimize projections to named types like it does for anonymous types?
In the Microsoft EF tutorial Efficient Querying, the section Project only properties you need describes how to make EF load only specific columns by projecting the entity queryable to an anonymous type. They don’t provide a code example, but to extend their other examples, it might look like this:
SQLite does not generate compound key correctly
I have a peculiar problem with EFCores SQLite framework, which works fine for PostgreSQL. So there is this entity:
EF Core: does it have something like NHibernate’s Future
Does anyone know if EF Core supports something like NHibernate’s futures?
How do I store a negative TimeSpan in Entity Framework?
I store shifts to events with a TimeSpan as the offset from the start of the event and another TimeSpan as the duration of the shift. The setup shift starts before the event (so everyone see the event as 11:00am – 4:00pm as desired while the setup shift starts at 10:15am).
Force columns for owned entity to be lower case in Entity Framework Core 8
I’m looking for a way to force database column names to be lower case on an owned entity. My scenario is I have an Address
class and a Customer
class.
how to fill entity with child entities when there is weak entity in middle
Users table:
How to save an Entity which has dependents with identical sub-dependents that you don’t want tracked
I have an object Concert, which has a collection of Tickets.
Each Ticket has a TicketOption.
EFCore override SaveChangesAsync does not save entity
public override Task<int> SaveChangesAsync(CancellationToken cancellationToken = default) { foreach(var entry in base.ChangeTracker.Entries<BaseDateEntity>() .Where(q => q.State == EntityState.Added || q.State == EntityState.Modified)) { var dateTime = DateTime.Now; var persianCalendar = new PersianCalendar(); var year = persianCalendar.GetYear(dateTime); var month = persianCalendar.GetMonth(dateTime).ToString(“D2”); ; var day = persianCalendar.GetDayOfMonth(dateTime).ToString(“D2”); var hour = persianCalendar.GetHour(dateTime).ToString(“D2”); ; var minute = persianCalendar.GetMinute(dateTime).ToString(“D2”); if (entry.State […]
EFCore 8, LinqKit – Expression in Include where clauses throws variable referenced from scope ‘, but it is not defined
When invoke the expression in EF-Core Include Where clauses, i become an InvalidOperationException