I start with an entity A with primary key A1, it has child collections B and C, but they are empty, because I haven't prefetched them. I now get a new occurrence of A (A prime) with primary key A1 with the child collections B and C filled.
What is a good way to get the A and A prime to be the same object and to get A collections of B a...
I have inherited a project that uses LLBLGen Pro for the DB layer. The DB model requires that when a entry is deleted a flag (DeletedDate is set to the current time). The last programmer ignored this requirement and has used regular deletes throughout the entire application.
Is there a way to set the code generator to do this automatica...
Hi,
We need to generate LINQ queries which are 100% unknown during coding (design time). This is because the logic is available in our framework which is 100% separated from any data projects. For data we use LLBLGen generated data access code.
Normally by using invokes on the DLL, which we specify to the framework (not reference) we c...
I am using LLBL Gen Pro v2.6 and am attempting to create a means of auditing changes made to the database. Now, I know that LLBL Gen has auditing built into it using AuditorBase and dependency injection. The question I have is; I need to track not only the stuff that LLBL Gen exposes as auditable, but also the User who made the changes. ...
My company is looking to use an ORM for new development in .Net. We are currently looking at nHibernate, because of its popularity, however LLBLGen is another option that we may consider. Cost is not a primary factor. We need a solution that provides good separation of the domain model from the database, a good caching strategy, developm...
DTO
I'm building a Web application I would like to scale to many users. Also, I need to expose functionality to trusted third parties via Web Services.
I'm using LLBLGen to generate the data access layer (using SQL Server 2008). The goal is to build a business logic layer that shields the Web App from the details of DAL and, of course,...
I currently fetch a collection of jobs like this:
jobs = new EntityCollection<JobEntity>(new JobEntityFactory());
var bucket = GetJobsBucket(filter);
var tempContext = new Context();
tempContext.Add(jobs);
var sorter = new SortExpression(JobFields.Id | SortOperator.Descending);
adapter.FetchEntityCollection(jobs, bucket, maxCount, s...
I am using LLBLGen Pro 2.5 with self-servicing. If I want to add some rows into my tables within a transaction and then update the first row I added, do I have to add that first entity into the transaction object again?
Here is a fictional example of what I mean:
Dim objCustomer as New CustomerEntity()
Dim trans as new Transaction(Iso...
I have the following (sample)code to filter search results from a LLBLGen data source:
IPredicateExpression firstFilter = new PredicateExpression();
firstFilter.Add(new FieldLikePredicate(CustomerFields.FirstName, null, txtSearchFirst.Text.Trim() + "%"));
llbldsCustomer.FilterToUser = firstFilter;
llbldsCustomer.DataBind();
gridview1.Da...
I have the following Sql Query that returns the type of results that I want:
SELECT b.ID, a.Name, b.Col2, b.COl3
FROM Table1 a
LEFT OUTER JOIN Table2 b on b.Col4 = a.ID AND b.Col5 = 'test'
In essence, I want a number of rows equal to Table1 (a) while having the data from Table2 (b) listed or NULL if the condition, 'test', doesn't exis...
How would the following sql query look when translated to linq?
SELECT
myId, Count(myId)
FROM MyTable
GROUP BY myId
I've tried the following:
var q = from a in db.MyTable
group a by a.Id into g
let count = g.Count()
select new
{
Count = Id,
Key= g.Key
};
but it raises an exception on enumeration indicating that there is n...
I have a table that has a column called Ordinal used to keep track of display order. When an entity changes its ordinal value, the other records in the database need to have their ordinal value adjusted, either up or down depending on the situation. Is there a way through llblgen to do this (2.6 adapter .net 3.5)?
I would need generated...
I'm passing a LinqDataSource into a Telerik RadGrid. The LinqDataSource is an LLBLGen ORM. Everything is working great - paging, grouping, filtering, etc. all work nicely.
I wanted to see how the SQL queries looked. I found these curious results:
When I look at page 1, two queries are executed... 1 for the total record count and 1 fo...
I've been looking and it seems no-one has cracked this yet but I thought I'd ask the community here as well to see if anything came up.
Is there a way to get client-side validation (jQuery, Live Validation, whatever) to automagically get the validation rules from LLBLGen's built in validation?
LLBLGen (and others like Subsonic) alread...
I'm trying to perform the following query in LLBL and I'm not having much luck.
DELETE FROM dbo.MyTable WHERE MyTableId NOT IN ('39', '43', '44')
Essentially, I'm up to this point:
private static void Delete(MyTableCollection newRecs)
{
PredicateExpression filter = new PredicateExpression();
MyTableCollection allRecords = new...
I see there are two main options for managing transactions with llblgen.
Method 1:
using(DataAccessAdapter adapter = new DataAccessAdapter())
{
adapter.StartTransaction(IsolationLevel.ReadCommitted, "TR");
try
{
// ...
adapter.Commit();
}
catch
{
adapter.Rollback();
throw;
}
...
What are the key differences between llblgen and nHibernate?
...
I'm having trouble understanding how to use ORM generated objects. We're using LLBLGen for mapping our database model to objects. These objects we encapsulate in another layer which represents our business model(I think).
Maybe this bit of code will explain this better.
public class Book { // The class as used in our application
pr...
In VisualStudio, when you drag and drop a table or an individual column from a data connection in server explorer, a gridview is created.
What I want to be able to do is drag and drop the columns to make a quick and dirty detail form to display an individual record. Is this possible in any way?
An even better way to do this would be v...
I am trying to work out with ORM tool to move over to and have narrowed it down to two candidates.
nHibernate or LLBLGen Pro
Please can you guys give me pros and cons in using both these tools especially if you have experience in both. I am not really interested in any other tools but am wanting some heads up so I can decide which too...