I assume this is an EF query
var client = Db.Clients.FirstOrDefault(c => c.Id == clientId);
>Hi everybody,
>
>I have this code
>
>
> int clientId = Convert.ToInt32(Request.Form["ClientId"]);
> var client = Db.Clients.Select(c => c.Id == clientId).Single();
>
> Db.DeleteClient(client);
>
>and the Db.DeleteClient(client) line produces a compile error.
>
>The signature of the method is
>
> public void DeleteClient(Client client, bool autoCommit = true)
>
>I can not figure out what is wrong and how can I make sure that my var contains a single client object to remove?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer