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 compiled
Dim VT as new bidiCardEntities
 
Dim Uyeler=Sorgula.Kont(VT , item.ID)
 
 
Public Class Sorgula
Public Shared ReadOnly Kont As Func(Of bidiCardEntities, Integer, IQueryable(Of Uye)) =
    CompiledQuery.Compile(
        Function(vt As bidiCardEntities, ID As Integer) vt.Uye.Where(Function(x) x.ID = ID) )
End Class
by Berat Bilgin   November 23, 2011 @ 8:25am
Tags: compiled
62 Views
no comments
 
C#
public interface IQuery<TResult>
{
    //Execute method that accepts an ObjectContext and returns a TResult
    TResult Execute(EntityContext context);
}
 
public abstract class QueryBase<TResult> : IQuery<TResult>
{
    //userCompiled parameter to decide whether to use compiled query or plain one
    protected QueryBase(bool useCompiled)
by Muhammad Mosa   September 05, 2009 @ 7:08pm
585 Views
no comments
 
C#
public static class A
{
   private static Func<MyContextEntities, int, Orders> compiledGetById;
 
  static A()
  {
     compiledGetById = CompiledQuery.Compile<MyContextEntities, int, Orders>(((ctxt, orderId) => (from o in ctxt.Orders where o.Id == orderId select o).FirstOrDefault()));
  }
 
  public static Orders GetOrderById(int orderId)
458 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