Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 145 Vote(s) - 3.62 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Entity Framework with text files (no database!)

#1
I'm used to Forms and DataSets but now I'm trying out WPF and the Entity Framework. My goal is to fill a DataGrid in WPF with the use of the Entity Framework. However, I do NOT have a database! I have simple text files with data that I have to parse to fill my Entities.

However, I get errors like "Entity type 'TableName' is not mapped." and crashes like that I don't have a connection string.

Is it possible to use the Entity Framework without a database? Or do I have to go back to use a DataSet?
Reply

#2
Interesting idea. Microsoft's quite enthusiastic that in theory you can write an EF provider that maps to any kind of data store. I've not got experience with one that maps to a text file, but this link suggests that someone's done it with CSV(!):

[To see links please register here]


If you're stuck with using text files though, why not try [LINQ to XML][1]?


[1]:

[To see links please register here]


And:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through