OK. So maybe I am lazy. I don't want to new up an EF object and have to define all of the properties in my linq statement. This is easy unless you want to modify a property in this object. In this case, my supplier name property may change based on if the supplier is an agency or a independent contractor.
var results = db.tblSuppliers.Select(s => { s.SupplierName = s.CompanyName == null ? s.SupplierFirstName + " " + s.SupplierLastName : s.CompanyName; return s; });
return results.ToList<tblSupplier>();
I get the following error: A lambda expression with a statement body cannot be converted to an expression tree
I want to return this back as a list of supplier objects.