CodingLINQ and performance

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Ally  
 To:  THERE IS NO GOD BUT (RENDLE)     
37887.1 

(specifically addressing this to Rendle because, come on, who am I kidding if I address it to all?)

 

I was wondering if you could do me a favour and dispense some experty .NET advice. My work has recently upgraded from .NET 2.0 to 4.0, at the same time as I'm starting work on a new project that will use SQL Server, but with a good chance that it'll shift to MySQL at some point in the future.

 

So I'm keen to use some sort of abstraction layer. LINQ appears to have an adapter for MySQL and would seem ideal. I've seen you speak highly about it before- but is having an entire site's data access layer comprise of LINQ even a sensible idea? Are there performance issues?Right now we have stored procedures that do things like create temporary tables- I'm assuming there is no equivalent in LINQ, and we'd have to still implement stored procedures?

0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Ally     
37887.2 In reply to 37887.1 

LINQ is more of an abstraction over query-like operations than a database adapter. It's very good for writing expressive code that can be optimised at runtime by the underlying provider.

 

If you're looking to implement a proper Data Access Layer, I suggest looking at NHibernate, which has MySQL support and a LINQ provider. It will also let you map specific operations to Stored Procedures.

Happy now?

0/0
 Reply   Quote More 

 From:  Ally  
 To:  THERE IS NO GOD BUT (RENDLE)     
37887.3 In reply to 37887.2 
Ah, yes- the more I read, the more I realise that when I was talking about LINQ, I was more talking about LINQ to SQL.

NHibernate looks very interesting. Googling around that I found DataObjects.net- I don't think that the cost of licensing it would be an issue and it appears to have both better LINQ support and better performance. I guess I'll try setting them both up and seeing which one works best.
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Ally     
37887.4 In reply to 37887.3 

I wouldn't touch DataObjects with a 10-foot pole. It's an odd little proprietary thing without much of a user base. You should evaluate NHibernate and Entity Framework 4 to see which suits you best; you'll be able to get help with either of those on StackOverflow.

 

If you've got some money to spend, I recommend looking at LLBLGen to make your life easier.

Happy now?

0/0
 Reply   Quote More 

 From:  Ally  
 To:  THERE IS NO GOD BUT (RENDLE)     
37887.5 In reply to 37887.4 

Ah, thanks for the warning. I've already seen plenty of NHibernate posts on Stack Overflow, I can see how that is going to be a useful resource. Thanks for the help- I'll recommend we pick up LLBLGen. One of the reasons I was looking outside of NHibernate was the idea of the XML configuration files. A GUI will go a long way to avoiding that problem...

 

EDIT: Just seen Fluent NHibernate, too. Interesting.

0/0
 Reply   Quote More 

Reply to All    
 

1–5

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats