Question about linq thebeerhouse, when we use linq as data access layer, is that means we no longer need the DAL folder in thebeerhouse? I mean is that DAL folder still a requirement to run the project?
Question about linq thebeerhouse, when we use linq as data access layer, is that means we no longer need the DAL folder in thebeerhouse?
That is correct. Since the DataContext would then encapsulate all your actual data access functionality, there would be no need to create data access objects or write custom code to interact with the database, and hence no DAL folder would be necessary.
So Linq will work with any data provider such as mysql, oracle and so on since it provides data mapping? Also, when we make a data type change in the sql server, all we have to do is re-drag it to the O/R Designer and hence no code change will be necessary,
is that true? That is great advantage. Also, is there any other advantage when using linq for thebeerhouse or in general?
So Linq will work with any data provider such as mysql, oracle and so on since it provides data mapping? Also, when we make a data type change in the sql server, all we have to do is re-drag it to the O/R Designer and hence no code change will be necessary,
is that true? That is great advantage. Also, is there any other advantage when using linq for thebeerhouse or in general?
Linq to SQL only works with Sql Server. However, Linq to Entities in the Entity Framework works with any data store for which an ADO.NET data provider exists, so mySQL and Oracle would be covered there.
Also, yes, if you redrag the table into the O/R designer, it will redefine your data context and all your entities to match any changes in the underlying schema.
There are many advantages to using Linq for the BeerHouse, probably the greatest of which is that you don't have to write or maintain any T-SQL or stored procedures.
avmood
Member
493 Points
908 Posts
linq thebeerhouse
Mar 13, 2009 02:20 PM|LINK
Question about linq thebeerhouse, when we use linq as data access layer, is that means we no longer need the DAL folder in thebeerhouse? I mean is that DAL folder still a requirement to run the project?
Lee Dumond
Contributor
6404 Points
1173 Posts
Re: linq thebeerhouse
Mar 13, 2009 04:48 PM|LINK
That is correct. Since the DataContext would then encapsulate all your actual data access functionality, there would be no need to create data access objects or write custom code to interact with the database, and hence no DAL folder would be necessary.
Follow Me on Twitter
avmood
Member
493 Points
908 Posts
Re: linq thebeerhouse
Mar 13, 2009 05:01 PM|LINK
So Linq will work with any data provider such as mysql, oracle and so on since it provides data mapping? Also, when we make a data type change in the sql server, all we have to do is re-drag it to the O/R Designer and hence no code change will be necessary, is that true? That is great advantage. Also, is there any other advantage when using linq for thebeerhouse or in general?
Lee Dumond
Contributor
6404 Points
1173 Posts
Re: linq thebeerhouse
Mar 17, 2009 09:35 PM|LINK
Linq to SQL only works with Sql Server. However, Linq to Entities in the Entity Framework works with any data store for which an ADO.NET data provider exists, so mySQL and Oracle would be covered there.
Also, yes, if you redrag the table into the O/R designer, it will redefine your data context and all your entities to match any changes in the underlying schema.
There are many advantages to using Linq for the BeerHouse, probably the greatest of which is that you don't have to write or maintain any T-SQL or stored procedures.
Follow Me on Twitter