I am a NEWBIE
I tried what is listed under
"Using the entity classes"
Option 2 for updates
CustomerEntity customer = new CustomerEntity();
customer.CustomerID="CHOPS";
customer.IsNew=false;
customer.Delete(); // <--NOTICE HERE.
for Delete and it seems to query the database for the data of the entity. I used Sql Profiler for finding this.
From the docs, it says
"Note: this will also work for fast deletes."
In these scenario, my experience indicates that I messed/missed something.
I guess I can do the above using a Predicate and that would NOT cause the query for the object data.
Any ideas ?
Other question I had about Templates:
Is there any CodeSmith templates for generating a Predicate Giver class.
For each usertable in the database
{
for each PK and UK
{
Provide a method for getting the Predicate.
}
}
something like
public static IPredicateExpresssion CustomerPK (int CustomerID)
{
}
public static IPredicateExpression UserInActivityPK(int UserID, int ActivityID)
{
}
so that we can reuse this piece of code and once again it can be generated.
May it is not needed at all ? (To my excuse, read line 1. That is catch (Exception ex) for people like me.
)
Regards: