Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entity Framework without database

I like working with the entity framework for many reasons- the ease of use of the entity designer, the power of linq, and the ease of binding. Occasionally I want to build a simple app that doesnt need to use a database, but still needs to work with data and display it on screen, in grids etc, so I'd like to just create a quick EF model and use it for this, but it doesnt seem to work very will with just using it for local data.

My question is- is there a correct usage of the EF for working with local data, and perhaps then just serialize/deserialize the whole context to a file? Or is this just too much effort to make work properyly? I used to use Datasets in this way, along with Linq to Dataset, and it works well... So perhaps those are still the better way to go for this scenario?

like image 596
Brady Moritz Avatar asked Jun 02 '12 17:06

Brady Moritz


People also ask

Does Entity Framework only work with SQL Server?

Of course, one essential element of any modern software solution is the database, but in 2022 there are hundreds of battle-tested storage solutions. For example, the Entity Framework Core library supports over ten popular database engines, including Microsoft SQL Server, Oracle, PostgreSQL, MySQL, and SQLite.

Is Entity Framework core a database?

Entity Framework (EF) Core is a lightweight, extensible, open source and cross-platform version of the popular Entity Framework data access technology. EF Core can serve as an object-relational mapper (O/RM), which: Enables . NET developers to work with a database using .

Does Entity Framework Create database?

However, with ASP.NET you can use Entity Framework to generate a database based on an object model. Generally you would create an ER diagram and manually create all the tables one by one. With Entity Framework, you can create your entities in Visual Studio and all your tables will be created for you.

What are the three types of Entity Framework?

There are three approaches to model your entities in Entity Framework: Code First, Model First, and Database First. This article discusses all these three approaches and their pros and cons.


1 Answers

Yes you can use entity framework as local, and also access the data that is currently in-memory, read details as link below:

http://msdn.microsoft.com/en-us/data/jj592872.aspx

like image 147
Shahram fr Avatar answered Jan 05 '23 00:01

Shahram fr