I want fill the dataset in asp.net web application using Entity Framework. I am not familier with Entity Framework please help me.
How to create dataset and how to fill dataset?
I want fill the dataset in asp.net web application using Entity Framework. I am not familier with Entity Framework please help me.
How to create dataset and how to fill dataset?
You do not usualy use EF to work with DataSet objects.
If you are interested in the standanrd way of populating DataSet, the following are some articles and tutorials that may help you working with DataSet objects:
Working with Datasets in Visual Studio
HOW TO: Create and Use a Typed DataSet by Using Visual C# .NET
Introduction to strongly Typed Data Sets
The C# Station ADO.NET Tutorial
If you are interested in working with Entity Framework, the following videos set may help:
Practical Entity Framework for C#: Explore Entity Framework
You can always use search engines to further searching for tutorials, guides and samples ..
DataSet to show the data on your UI controls. Why do you want to use DataSet here?you can populate your dataset with the following code snippests this question is already asked on stackoverflow.com and answered
you can find Populate a DataSet using Context - Entity Framework 4 here
so i just copy from there and paste here for you
DataSet dataSet = new DataSet("myDataSet");
dataSet.Tables.Add(new DataTable());
//Setup the table columns.
foreach (CmsCategory categories in context.spCmsCategoriesReadHierarchy(n,sl,nn))
{
DataRow row = dataSet.Tables[0].NewRow();
row["A"] = categories.A;
row["B"] = categories.B;
dataSet.Tables[0].Rows.Add(row);
}
List<Customer> directly to your grid - there's absolutely no need to convert back to a DataSet/DataTable just for this!! You need to read up more on Entity Framework and how to use it to databind to UI controls....@Victor, From looking at the dates, I'm late to the party. If you are reading this now, what these folks are trying to say is that you are mixing technologies unneccessarily. The ADO.Net objects have essentially been replaced by the EntityFramework, beginning in .Net 3.5.
To answer the question posed on 6/25/2011, the actual code would be something like this:
List results = SomeQueryResults.ToList();
And that's about it. Most of the rest of the work is done by the grid. you might have to override the OrderBy() function, but that might be it.