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
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 6 days ago.
Improve this question
I want to get data count after paging and sorting but I want to get all data count without filters(paging and sorting):And also want it all to happen in one request
Thank you
.NET 6: Entity Framework Core
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 6 years ago.
Improve this question
I am working in MVC. The user will enter data for about 50 fields, I will get this data in a class object from the view.
So, how can I copy this class object to an edmx table object in order save data into data base in c# ?
Try adding http://automapper.org/ in your project and in your code you would write something like.
var address = Mapper.Map<Address>(yourViewModel);
......................
.......................
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 8 years ago.
Improve this question
I'm trying to avoid having hidden fields being overwritten when I post to the database. What code is needed in my Get/Post in order to pull existing fields and ensure they are maintained after the user clicks save?
I'm using sql/mvc 4/c#.
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();
}