Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble with casting
Message
From
23/09/2014 12:35:58
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01608054
Message ID:
01608068
Views:
28
This message has been marked as a message which has helped to the initial question of the thread.
>>>Hi, Naomi, just a curious question - why is LINQ to SQL being used?
>>>
>>>(I don't mean that question the way it sounds - I'm always genuinely curious when someone uses LINQ to SQL)
>>>
>>>Thanks....
>>
>>We're using Entity Framework in this application. The database is SQL Server.
>
>I understand. But "why"? These types of things have been done many times over in SQL Server/T-SQL (and I know you know that) :)

http://blogs.msdn.com/b/gblock/archive/2006/10/26/ten-advantages-of-an-orm.aspx

And to add a few more reasons:
- Compile time checking of types/queries.
- Being able to apply multiple optional filters without a complicated where clause or modifying the SQL code.
- Being able to apply an interface to multiple entities and write extension methods against that interface. For example several tables could have an active flag. You can put an IActiveEntity interface on the models for those tables and write a method such as ActiveOnly that retrieves only the active records. That same method can then be used for any set that implements that interface.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform