CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of LLBLGen Pro
C#
// LLBLGen Pro Query Spec, nested queries with custom projections and entity queries.
var qf = new QueryFactory();
var q = qf.Customer
            .Where(CustomerFields.Country == "Germany")
            .Select(() => new
            {
                CompanyName = CustomerFields.CompanyName.ToValue<string>(),
                City = CustomerFields.City.ToValue<string>(),
                Orders = qf.Order
                                .CorrelatedOver(OrderEntity.Relations.CustomerEntityUsingCustomerId)
by Frans Bouma   March 22, 2011 @ 9:04am
169 Views
no comments
 
C#
// LLBLGen Pro Query Spec, nested queries with custom projections. 
var qf = new QueryFactory();
var q = qf.Customer
                .Where(CustomerFields.Country == "Germany")
                .Select(() => new
                {
                    CustomerId = CustomerFields.CustomerId.ToValue<string>(),
                    Orders = qf.Order
                                    .CorrelatedOver(OrderEntity.Relations.CustomerEntityUsingCustomerId)
                                    .Select(() => new
by Frans Bouma   March 22, 2011 @ 4:44am
183 Views
no comments
 
C#
// Linq to LLBLGen Pro 
LinqMetaData metaData = new LinqMetaData(adapter);
var q = from c in metaData.Customer
        select new
        {
            c.CustomerId,
            IsAmerican = (c.Country == "USA"),
            c.Country
        };
        
by Frans Bouma   March 17, 2011 @ 8:28am
261 Views
no comments
 
C#
// In memory list of objects
var idList = new List<Pair<int, int>>();
idList.Add(new Pair<int, int>() { Value1 = 10254, Value2 = 13 });
idList.Add(new Pair<int, int>() { Value1 = 10254, Value2 = 14 });
idList.Add(new Pair<int, int>() { Value1 = 10254, Value2 = 15 });
 
// Linq to LLBLGen Pro
LinqMetaData metaData = new LinqMetaData(adapter);
var q = metaData.OrderDetail
                    .Where(od => idList.Contains(new Pair<int, int>() { Value1 = od.OrderId, Value2 = od.ProductId }));
by Frans Bouma   March 03, 2011 @ 7:59am
207 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate