Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trouble with casting
Message
De
23/09/2014 12:35:58
 
 
À
23/09/2014 12:19:30
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01608054
Message ID:
01608068
Vues:
26
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform