Forgive me if my question is technically worded wrong but I basically need an anonymous method or a Func delegate to encapsulate the following functionality:
if (Cache.CurrentCustomer == null)
{
return null;
}
else
{
return Cache.CurrentCustomer.PersonID; // (Guid type)
}
The above if statement will return a value that is going to be assigned against an Order entity that has a PersonID property field exposed that accepts a nullable guid type.
If a Func delegate is possible then can instantiate on the fly like:
orderToInsert.PersonID = new Func() => { ... }
I would typically ship my if statement scenario out into a help support method this is a good opportunity to learn something I have been trying to pick for ages! TIA!!!