Quote:
Originally Posted by Imar
Hi there,
Yes, if they contain the same data, you should declare one outside all your methods and then fill it once. Where you do that depends; can be with a helper method that is called by each event handler, or you can do it in Page_Load or in the first event that fires.
Why are you using TableAdapters? Is that a deliberate design choice? They are more or less considered out-dated in .NET 4 applications....
Cheers,
Imar
|
Yea, I know TableAdpaters are obsolete but they are just so easy to use that I am using them for this site. Their downfalls are definitely apparent if I make changes to the database schema, that's for sure.
However, I am not proficient at LINQ but my SQL is pretty good so I like how you can just create query methods for each TableAdapter quickly just by using SQL queries. I also like how you can create partial classes of the TableAdapters to add business logic into the methods.
With the Entity Framework, if you want to group queries together with your tables is their any other way to do it other then hand coding classes for each table using LINQ in each method? Basically other then hand coding a the entire DAL yourself?
Not that it's a bad thing, it's just something that is very new to me.