ServiceReference1.Service1Client ser = new ServiceReference1.Service1Client();
List<OneTimeWorkout> list = ser.GetOneTimeWorkouts().ToList();
I'm trying to get list of OneTimeWorkout objects, however I get this error:
Cannot implicitly convert typ System.Collections.Generic.List<WN.Manager.ServiceReference1.OneTimeWorkout> to System.Collections.Generic.List<WN.Models.OneTimeWorkout>
My service reference is configured to reuse types in all referenced assemblies.
My service method:
public List<OneTimeWorkout> GetOneTimeWorkouts()
{
return new BusinessLogic.BusinessLogic().GetOneTimeWorkouts();
}
Another problem is that I cannot create
var list = ser.GetOneTimeWorkouts().ToList();
instead of generic list because later I do need to pass it for another method and var list seems not to be working (still the same error)
There were several similar questions already asked in stackoverflow, yet none of these answers seems to be working for me.