Recently i accidentally moved from a Dataset World to a Generic World. I am little confused with some of the Model.
In my Model , i had three types of Models as Product { Productid, ProductName}, ProductType {ProductTypeId, ProductTypeName} , ProductCategory {ProductCategoryId, ProductCategorName}
My Stored Procedure Returns {ProductName, ProdcutTypeName, ProductCategoryName }
Previously i used to use a Dataset :). But i am worried that how to save these combinations in a List. i cant take List or any other? Do i need to create a seperate class for this?
Could anyone suggest me that how to handle these situations?
Yes
You should create new models for all combinations your stored procedures return.
If you would start from scratch with, lets say Entity Framework Code First, you would probably define a couple of models that would suite most of your needs and target your custom stored procedures (that would probably be a lot fewer) to those projections.
But now that your are working on an existing database your world will be a bit awkward. And something that can burn you is stored procedures that if/else returns different result sets. Linq frowns on those. I learned this the hard way.