Questions tagged [llblgen]

LLBLGen Pro generates a complete data-access tier and a business objects tier, utilizing powerful O/R mapping technology and a flexible task-based code generator.

83 questions
1
vote
3 answers

Create expression tree for "like" on a decimal field

I would like to create an expression tree for a query expression that looks something like this: employee => employee.Salary.StartsWith("28") So that the sql could appear as: where (employee.salary like '28%') The problem is that the property…
Waliaula Makokha
  • 815
  • 1
  • 11
  • 21
1
vote
1 answer

LLBLGen: Copy table from one database to another

I have two databases (SQL Server 2005) with the same table schemes. I need to copy data from source table to destination with some modification of data along the way. And if destination table already contains some data, then rows from source table…
StreamT
  • 315
  • 2
  • 5
  • 18
1
vote
2 answers

How to merge entity graphs in LLBLGen?

Let's assume I have 2 tables, A and B with 1-0..1 relation. I use the Adapter approach. I need to load a collection of A entities in one place, and then load all related B entities for all A entities later. The reason to not use Prefetch is that in…
Pavel Gatilov
  • 7,579
  • 1
  • 27
  • 42
1
vote
0 answers

Count predicate, how does it work?

With a linq query I retrieve a list from the database. The list contains 2 items of a specific class containing the property RoleType. the type of RoleType is an int. the first object has a property value 0. the second object has a property value…
Cornelis
  • 1,729
  • 5
  • 23
  • 39
1
vote
1 answer

LLBLgen 3.5 Derived Tables Query

I'm trying to get the following SQL to work with llblgen... SELECT *,(SELECT TOP (1) Id FROM Content.Grades WHERE Account = Authentication.Account.Id ORDER BY Grades.GradingDate DESC) AS CurrentGrade FROM Authentication.Account WHERE (SELECT TOP…
Reaper
  • 89
  • 6
1
vote
1 answer

How to specify AssemblyVersion in LLBLGen?

I'm using LLBL Gen Pro 3.5 command line (CLIRefresher and CLIGenerator) to create the solutions. It automatically creates a AssemblyInfo.cs which contains this code: AssemblyVersion("1.0") I want to set it to another version while building the…
Afshin Alizadeh
  • 218
  • 3
  • 10
1
vote
0 answers

Should ORM (Hibernate/LLBLGen etc.) files be kept separately?

Are there any benefits of keeping the ORM (Hibernate/LLBLGen etc.) files separately from the main project repo/branch (i.e. in a different repo/branch). I am not sure what is the best approach. I kind of like the idea keeping them separately but in…
Cemre Mengü
  • 18,062
  • 27
  • 111
  • 169
1
vote
1 answer

Why the following query results in an exception?

The following query results in the exception: "Unable to cast object of type 'System.Linq.Expressions.TypedConstantExpression' to type 'SD.LLBLGen.Pro.LinqSupportClasses.ExpressionClasses.SetExpression'.". What could be the problem? return…
Hasan Fahim
  • 3,875
  • 1
  • 30
  • 51
1
vote
2 answers

How to query by composite keys using ORM + LINQ?

I have an array of in memory objects that represent the composite keys that I want to query by eg: public class Key { public string Part1 {get;set;} public string Part2 {get;set;} } Now say I have an IQueryable and I want to return…
Alwyn
  • 8,079
  • 12
  • 59
  • 107
1
vote
1 answer

Merge two LLBLGEN 2 source files

I have two LLGLGEN 2.6 pro source files that I have to merge in my git repo (2 different branches). Due to the "professionnal" work of previous programmers on this project, the two projects have changes (the fork is 1 year old) that are not tracked…
Dede
  • 1,640
  • 2
  • 14
  • 24
1
vote
1 answer

Cannot switch a connection string in LLBL Gen Pro

I have two databases with the same schema inside a Sql 2008 R2 Server, of which names are Database1 and Database2. I connected and performed queries on the Database1, and then changed to Database2 to fetch my entities using the following…
Toan Nguyen
  • 11,263
  • 5
  • 43
  • 59
1
vote
0 answers

LLBLGen Template Binding test for date type

In the LLBLGen Template Bindings Viewer, I want to check if a field is a date type, and if so, do an action I have similar, that checks for a string type: <[Foreach EntityField]> <[If IsStringField]><[EntityFieldName]> = "";…
Craig
  • 381
  • 5
  • 22
1
vote
2 answers

LLBLGen viewing generated SQL statement

I'm using LLBLGen to access a SQL Express database using LLBLGen runtime framework. Using Visual Studio 2010. I have created a predicate expression, however It does not seem to be doing what I thought it should, how can I view the Generated SQL…
Craig
  • 381
  • 5
  • 22
1
vote
0 answers

How to load distinct items into llblgen pro collection

I have a collection like the code below. I load all items from table. How to load just distinct items on specific field? var objlogcollection = new ClsfIcdNineToClsfIcdTenDiagnosisCollection(); IPredicateExpression filter = new…
Mindaugas
  • 163
  • 1
  • 7
  • 16
0
votes
1 answer

Generic entity counter routine

I have a bunch of tables which all have the same column called SessionID of type Guid, this is the ID of the session the entities were created in. I am trying to write a generic class that will count the entities for specific session and specific…
NeddySpaghetti
  • 13,187
  • 5
  • 32
  • 61