Невозможно неявно преобразовать тип «DoctorFront.Models.DocMaster» в «System.Collections.IEnumerable». Явное преобразование существует (вы пропали без вести броска?)Вам не хватает роли?
namespace DoctorFront.Controllers
{
public class DoctorController : ApiController
{
static readonly IDocRepositories Repository =new DocRepositories();
public IEnumerable GetAllDoctor()
{
return Repository.GetAll();
}
public IEnumerable GetDoctor(int id)
{
return Repository.Get(id);
}
}
}
Моя догадка, что ваш 'метод GetDoctor' предназначен для возврата' DocMaster' , правильно? –
измените тип возврата на что-то вроде 'DocMaster'. –
Да, он возвращает главную таблицу doc –