This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------------ | |
// <auto-generated>This code was generated by LLBLGen Pro v5.0.</auto-generated> | |
//------------------------------------------------------------------------------ | |
using System; | |
using System.ComponentModel; | |
using System.Runtime.Serialization; | |
using System.Xml.Serialization; | |
using System.Collections.Specialized; | |
using System.Collections.Generic; | |
using System.ComponentModel.DataAnnotations; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in the generated massive file for fluent mappings. | |
public partial class FluentModel : OpenAccessContext, IFluentModelUnitOfWork | |
{ | |
private static string connectionStringName = @"AdventureWorksConnection"; | |
private static BackendConfiguration backend = GetBackendConfiguration(); | |
// The line below is generated by the Telerik 'wizard' (which should actually be called 'dumbass') and causes the code to recreate the mapping model | |
// every time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object newValueInType = newValue; | |
string newValueAsString = newValue as string; | |
if(type == typeof(DateTimeOffset)) | |
{ | |
newValueInType = DateTimeOffset.Parse(newValueAsString); | |
} | |
if(type == typeof(Guid)) | |
{ | |
newValueInType = Guid.Parse(newValueAsString); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated linq queries: | |
/// <summary>Gets the query to fetch the typed list OneToManyPocoLinq</summary> | |
public IQueryable<Northwind.Adapter.TypedListClasses.OneToManyPocoLinqRow> GetOneToManyPocoLinqTypedList() | |
{ | |
var current0 = this.Customer; | |
var current1 = from c in current0 | |
join o in this.Order on c.CustomerId equals o.CustomerId | |
join od in this.OrderDetails on o.OrderId equals od.OrderId | |
select new {o, c, od }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// these lambda's are used in e.g. projections in typed queries to materialize object arrays into typed objects. | |
// running this 100000 times at runtime takes 20551ms | |
System.Linq.Expressions.Expression<Func<OrderPocoQsRow>> l = () => new NW26.Adapter.TypedViewClasses.OrderPocoQsRow() | |
{ | |
CustomerId = OrderPocoQsFields.CustomerId.ToValue<System.String>(), | |
EmployeeId = OrderPocoQsFields.EmployeeId.ToValue<Nullable<System.Int32>>(), | |
Freight = OrderPocoQsFields.Freight.ToValue<Nullable<System.Decimal>>(), | |
OrderDate = OrderPocoQsFields.OrderDate.ToValue<Nullable<System.DateTime>>(), | |
OrderId = OrderPocoQsFields.OrderId.ToValue<System.Int32>(), | |
RequiredDate = OrderPocoQsFields.RequiredDate.ToValue<Nullable<System.DateTime>>(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void TypedViewPocoTest1() | |
{ | |
using(var adapter = new DataAccessAdapter()) | |
{ | |
var metaData = new LinqMetaData(adapter); | |
var q = (from i in metaData.InvoicesPocoLinq | |
where i.Country == "USA" | |
select i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Non-change tracking individual fetches (100 elements, 10 runs), no caching | |
------------------------------------------------------------------------------ | |
Handcoded materializer using DbDataReader : 0,79ms per individual fetch | |
PetaPoco Fast v4.0.3 : 0,90ms per individual fetch | |
LLBLGen Pro v4.2.0.0 (v4.2.14.0424), Poco typed view with QuerySpec : 0,95ms per individual fetch | |
LLBLGen Pro v4.2.0.0 (v4.2.14.0424), typed view : 1,21ms per individual fetch | |
Linq to Sql v4.0.0.0 (v4.0.30319.33440) : 2,53ms per individual fetch | |
LLBLGen Pro v4.2.0.0 (v4.2.14.0424), Poco typed view with Linq : 6,50ms per individual fetch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns:v="urn:schemas-microsoft-com:vml" | |
xmlns:o="urn:schemas-microsoft-com:office:office" | |
xmlns:w="urn:schemas-microsoft-com:office:word" | |
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" | |
xmlns="http://www.w3.org/TR/REC-html40"> | |
<head> | |
<meta http-equiv=Content-Type content="text/html; charset=windows-1252"> | |
<meta name=ProgId content=Word.Document> | |
<meta name=Generator content="Microsoft Word 14"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var q = ctx.Customers.Select(c=>new Customer() { CompName = SomeMethod(c.CompanyName)}); | |
-> visit the select lambda, and convert it so it becomes: | |
(values, indices) => new Customer() { CompName = SomeMethod(values[indices[0]])}; | |
then compile the lambda. At projection time, execute the lambda with the object[] obtained from the datareader as 'values' | |
and a set of indices, one for each db value placed in the project. This way you can have any in-memory call in the projection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////////////////////////////////////////////////////////// | |
// // | |
// ENBSeries effect file // | |
// visit http://enbdev.com for updates // | |
// Copyright (c) 2007- Boris Vorontsov // | |
// // | |
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++// | |
// // | |
// enbeffectprepass.fx depth of field by kingeric1992, // | |
// based on GDC 2004 presentation: // |
OlderNewer