Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I tried to update model/table in the ORM but it still shows there even after updating it.
I don't know what is the problem in this even i have changed the table name and deleted my models using select all then delete in the ORM and removed EDMX as well but still same issue persists.
Found the solution to my answer as i was creating table without primary key so it didn't add it in the ORM.
Using primary key worked with me.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I am a beginner to Entity Framework. In my project, I'm following a model-first approach, I created my tables and the associations between them, like in this screenshot:
For the Visual Studio mapping always takes the KF into account even if I don't ask.
Can someone help me overcome this problem?
below the code of the two entities
public partial class Currencies
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public Currencies()
{
}
Thank you !
help me overcome this problem
which problem? This is how EF is supposed to work.
If you really want to query it yourself later, without an FK index, then replace the Currencies property with an Guid CurrencyId in ExchangeRate.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
The community reviewed whether to reopen this question 7 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I want to use in-Memory entity framework , could you help me guys
I can't find a way to use In memory db # entity framework 6.2.0
Yes, there is an in-memory provider for EF6 available: https://entityframework-effort.net/
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I'm working on a project in which i have to deal with Staff accounts and in Accounts details i have more then one enteries with same id and I want to delete single record from the list without effecting others row with same Id
You should make it unique first. You can, for example, use the id=id_index so in this case when you are deleting it is unique.
Also, if it is just removing from the interface you can use 'this' keyword inside change event by using jquery.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
After adding the framework to my project I am unable to add more tables to the framework. Tried "updating model from database" in the database design in Visual Studio but it does not save the new table I want to add though it sees the new table in the database that is not in my model but does not add it
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
The question was about the concept of database first or code first.
When i'm using database first, how i can check if my database is already created and filled.
Thanks
Really, you are asking two different questions. Entity Framework is not a database administration tool and as such does not have any functionality for directly loading data from a spreadsheet.
If you research each part of your question separately, you might have more luck.
Seeding data with Entity Framework
Reading Excel Files with C#
Reply to comment:
if (!context.PostalCodes.Any())
{
IEnumerable<PostalCode> postalCodes = ReadPostalCodes();
foreach(var postalCode in postalCodes)
{
context.PostalCodes.Add(postalCode);
}
context.SaveChanges();
}