Here we are on EF Core and got 3 tables:...News...Items...Links...And more (except News, Items): Content, Post, Form, etc....And my model definitions...public class Item
{
public int Id { get; set; }
public string Name { get; set; }
public dec...
I have an entity with...entity.Property(f => f.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
...because for some reason, I need to enter some id's manually.
is it possible to automatically add the next available id (int) if the id is not p...
i'm working with EF6 code first, and i used ...this... answer to map a ...List<stirng>... in my entitie....This is my class... [Key]
public string SubRubro { get; set; }
[Column]
private string SubrubrosAbarcados
{
get
...
I'm trying to add data to the database using EF Core, but I cannot overcome duplicate key error: ...Cannot insert duplicate key row in object 'dbo.Stocks' with unique index 'IX_Stocks_Name'. The duplicate key value is (stock1)....I have entity ...Stock...
I have a number of inheritance hierarchies in my model. I'm using Entity Framework Core 3.1.2 with a Postgres database. Code First. I am trying to create a migration to generate my database tables....I mapped my first abstract object...public DbSet<Asset>...
I have the following class that I want to use as my data context in Entity Framework:... public class AggregateRecord : IAggregateRecord
{
[Key]
public int AggregateRecordID { get; set; }
public DateTime? InsertDate { get; s...