New Posts New Posts RSS Feed: Not In Opperator Using in EntityQuery
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Not In Opperator Using in EntityQuery

 Post Reply Post Reply
Author
vinothvdp View Drop Down
Newbie
Newbie
Avatar

Joined: 21-Sep-2007
Location: India
Posts: 27
Post Options Post Options   Quote vinothvdp Quote  Post ReplyReply Direct Link To This Post Topic: Not In Opperator Using in EntityQuery
    Posted: 27-Jun-2008 at 4:03am

hai ,

How to use Not In Opperator in EntityQuery any exampale pls tell me
thanks
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 27-Jun-2008 at 8:29am
Here is an example:
 
Reversing a Condition with the Not Operator

This example introduces the EntityBooleanOp.NOT operator, which reverses the sense of a condition.  Like the OR operator, the NOT operator is applied after the clause to which it applies has been defined.

C#

#region Name Does ! (Contains the Letter 'E')

/// <remarks>

/// select * from "dbo"."Product" where (( not "dbo"."Product"."ProductName" like ?))

/// Params: v0=%E%

/// </remarks>

internal static RdbQuery GetQueryNameDoesNotContainsE() {

  RdbQuery query = new RdbQuery(typeof(Product));

  query.AddClause(Product.ProductNameEntityColumn, EntityQueryOp.Contains, "E");

  query.AddOperator(EntityBooleanOp.Not);

  return query;

}

#endregion

 

VB

 

#Region "Name Does NOT Contains the Letter 'E'"

  ''' <remarks>

  ''' select * from "dbo"."Product" where (( not "dbo"."Product"."ProductName" like ?))

  ''' Params: v0=%E%

  ''' </remarks>

  Friend Shared Function GetQueryNameDoesNotContainsE() As RdbQuery

    Dim query As New RdbQuery(GetType(Product))

    query.AddClause(Product.ProductNameEntityColumn, EntityQueryOp.Contains, "E")

    query.AddOperator(EntityBooleanOp.Not)

    Return query

  End Function

#End Region

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down