Basic Questions for Getting Started

Posts   
 
    
Orion
User
Posts: 4
Joined: 18-Dec-2009
# Posted on: 18-Dec-2009 11:04:37   

I have licensed Pro edition of version 2.6. I'm using SQL Server 2008 and I'm using the Target Per Entity way of generating the code. Also, I'm trying to use the Adapter method.

This is my first project to really use LLBLGen. I'm buildn't an ASP.NET MVC based application. I've done a little with LINQ-to-SQL. This project is rather large and I felt like LINQ-to-SQL would not work for me and but I need some sort of generated system. I've used NetTiers quite a bit but it's just very immature.

Long story short I tried to dive in head first into LLBLGen but I found a lot of complexity. Even though I purchased LLBLGen I spent time looking at my options again (LINQ-to-SQL, Entity Framework, rolling my own thing). It looks like LLBLGen is my best option, particularly since I need something generated. So, I need help! I'll probably have more question but this is where I'm at for now. I need to do as much with the LINQ interface as possible as I think the API is a bit too verbose and complicated (RelationalBuckets, etc) to use for other members of my team that will eventually join me.

First, I couldn't find a beginner's guide LLBLGen. I have been reading the help file though. Here are some of my issues:

  • How can I make LLBLGen work with ASP.NET MVC. I'd just like to see a similar effect that I get with using LINQ-to-SQL and the stroingly-typed View Models. I tried just creating a basic View using an entity class and, of course, ASP.NET MVC generated code to add input controls for some of the extra properties of the entities (like IsNew etc). Is there a better way of going about this for ASP.NET MVC? Also, can LLBLGen work in a similar way as in LINQ-to-SQL where the entities are automatically updated on a Post? Will these Entities have problems being used in ASP.NET MVC in this way? I know that LLBLGen does a lot of tracking and so forth; I don't understand it exactly but it seems it might pose a problem.

  • Are there some examples of doing inserts/updates/deletes with LINQ2LLBL and using the Adapter mode? Can I update/delete a batch of records without loading them up (as in "DELETE FROM customer WHERE customer.country == "Brazil")?

  • How best can we pass data with LLBLGen through an API. For instance, say I built a layer that actually held the code for doing the LINQ2LLBL and my ASP.NET MVC just interacted with that layer and perhaps I had a web service that consumed data from that API? It seems like I'd need some kind of DTO. But the problem with that seems to be how changes made to a DTO can be bubbled up to the LLBLGen Entities.

The first two are more important issues for me but an answer to the last one will kind of dictate the direction of the code base in terms of whether there will be an API.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 18-Dec-2009 12:12:31   
  • How can I make LLBLGen work with ASP.NET MVC. I'd just like to see a similar effect that I get with using LINQ-to-SQL and the stroingly-typed View Models. I tried just creating a basic View using an entity class and, of course, ASP.NET MVC generated code to add input controls for some of the extra properties of the entities (like IsNew etc). Is there a better way of going about this for ASP.NET MVC? Also, can LLBLGen work in a similar way as in LINQ-to-SQL where the entities are automatically updated on a Post? Will these Entities have problems being used in ASP.NET MVC in this way? I know that LLBLGen does a lot of tracking and so forth; I don't understand it exactly but it seems it might pose a problem.

I'm not an expert in MVC, but you find some very useful threads in this forum, about the subject, and some of them has very good code contributions. Just search the forum for: MVC

  • Are there some examples of doing inserts/updates/deletes with LINQ2LLBL and using the Adapter mode? Can I update/delete a batch of records without loading them up (as in "DELETE FROM customer WHERE customer.country == "Brazil")?

LINQ2LLBL is for fetching only, so no Inserts updates or deletes. Actually these are to simple to do that you don't need LINQ2LLBL for that. LINQ's main advantage is to unify and simplify queries.

  • How best can we pass data with LLBLGen through an API. For instance, say I built a layer that actually held the code for doing the LINQ2LLBL and my ASP.NET MVC just interacted with that layer and perhaps I had a web service that consumed data from that API? It seems like I'd need some kind of DTO. But the problem with that seems to be how changes made to a DTO can be bubbled up to the LLBLGen Entities

I've been using the Adapter model with WCF, so I can safely send entities over the wire. The adapter entities are designed to be the business objects, you'd want to use.