esther
Help) [Answered]
I have relation with table in different database. I searched it possible if we use 2 queries and you can map it in
DTO
manually. I already created different Model
, Repository
, IRepository
etc. Now i'm getting confused how to add the relation between two in DTO
, Any reference?9 replies
How to migrate table?
I have database with table: Quote, so i tried to migrate new table Author on database using package manager console but there's an error:
System.InvalidOperationException: 'Cannot use table 'Quote' for entity type 'Sample' since it is being used for entity type 'Author' and potentially other entity types, but there is no linking relationship. Add a foreign key to 'Sample' on the primary key properties and pointing to the primary key on another entity typed mapped to 'Quote'.'
Here my Author.cs model:
Here my Sample.cs model:
and here RepositoryContext.cs:
5 replies