I'm a newbie to Entity Framework, so I'd like to try something simple to get started on Visual Studio 2010.
Suppose I start out with the following SQL statement (the View sys.databases exists in the master database on SQL Azure):
SELECT name, create_date
FROM sys.databases
WHERE database_id > 3
So instead of using traditional ADO.NET of executing this SQL and using a DataReader to insert the results into a custom class, I attempt doing things the EF way.
So I attempted to create a Entity Data Model. In the Wizard, I am given two choices: "Generate from Database" or "Empty Model". I tried to "Generate from Database", but the Wizard doesn't list the vast majority of the Views in the master database. So that approach appears to be a dead-end. I then tried "Empty Model", which is a bit more work (for this newbie) and insists on prefixing "databases" with "dbo", and I need "sys". So I'm basically stuck, and I haven't found any examples of people using EF to work with system views.
Does anyone have any detailed examples of accomplishing this? Many thanks.