I have .net 4.5 WCF service. I will rewrite the service implementation to use EF6 to access DB. This service has many clients and handle many calls. I cannot change service contract and clients. Does it make sense to use Async EF operations like SaveAsync, at the end my service must return T not Task (becouse of the old clients).
Update
Exaple operation contract
[OperationContract]
public object AddEntity(object entity)
{
using(var context = new MyContext())
{
context.Add(entity)
var task = context.SaveChangesAsync()
return task.Result;
}
}
So even I am usining async the thread will be block by task.Result. I cannot use await becouse than the operation contract must be changed to return Task. How to implement such scenario?