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
EF Core : foreign key column with same name as existing navigation property
I want to use EF Core to map a legacy database. I cannot scaffold as there are hundreds of tables and I am only interested in very few. The situation is: I have a required many-to-one relationship linked by a column name that matches the name of the property that I want to give.
How to model relationships which need more then one foreign key
I have an sqlite database from a genalogy program which stores (besides a lot of other stuff) persons and families. Here a reduced schema: