locked
Linq to Sql For Enterprise Application RRS feed

  • Question

  •  Hi
    Can anyone tell me what is the advantage and the disadvantage of using linq to sql for large enterprise application like ERP,
    or can i use linq to sql for that or not .. why

    Regards
    Matelin
    Monday, February 2, 2009 6:05 PM

All replies

  • The benefit of Linq is the common syntax. 

    The disadvantage of Linq to Sql is that you don't get the benefits of a rich domain model.  Because of this I prefer to use MS Entity framework for large scale development.


    Pl mark as answer if this has helped
    Monday, February 2, 2009 7:19 PM
  • Linq2SQL is simple and easy to use against SQL Server.  If you are using for a CRUD operations against a sql server database, this is probably way to go...

    If you are building an application as Model Driven Architecture, as GMoore mentioned, an ORM like Entity Framework, NHibernate, IBatis.NET etc., are your best bet.
    Pl mark if answer solves your problem | Visit http://gajakannan.com/netarch.aspx for .net ref Arch
    Monday, February 2, 2009 9:09 PM
  • One more thing which i would like to add here is:
    Linq to SQL advantage
    1) Increase in productivity and reduce in total cost of ownership by reduce development time.
    Linq to SQL disadvantage
    1) Performance of Linq to SQL is comparitively low compared to hardcoded DAL as it is going to generate SQL on the runtime which would definitely be slowr compared to hard coded SQL statements written to best fit for a specific database like sql server, oracle etc. Also identity map created by Linq to SQL will further affect performance.
     
    Regards
    TA123

    Tuesday, February 3, 2009 5:19 AM
  • I believe you may want to let us know what you want to compare Linq2SQL against...  ADO.NET data services, Entity Framework, ADO.NET, Native provider connectors like ODP...
    Pl mark if answer solves your problem | Visit http://gajakannan.com/netarch.aspx for .net ref Arch
    Wednesday, February 4, 2009 11:34 PM
  • Any DAL layer which has hardcoded queries will have higher performance compared to Linq to SQL which generates query at runtime like any ORM tool.
    I have mentioned the rest of the advantages in my previous post.

    Regards
    TA123
    Thursday, February 5, 2009 1:08 PM
  • Hi Matelin- I'm also researching various solutions being mentioned here, so my answer re: Linq to SQL is unfortunately only academic rather than road tested.

    The single problem I see with this technology right now is that MS seems to be waffling on whether this will be a first class solution with dedicated development resources (which I think it deserves), or just another poorly defined subset to EF (which is what I think will happen unless enough developers complain loudly enough to MS). EF just seems bloated, unfocused, and not designed to cater to a domain driven development effort.

    The only solution that seems to be mature and which does cater to the domain is nhibernate.

    But as I said earlier, I am still in research mode and looking for feedback also. Do any of the experienced nhiberbate users have any favorite links, articles or reference apps that might shorten the learning curve?

    Regard,
    Berryl
    Wednesday, February 11, 2009 5:38 AM