Não é possível converter implicitamente tipo "System.Collections.Generic.IEnumberable<SS_API.Model.Project>" em "Microsoft.AspNetCore.Mvc.ActionResult<System.Collections.Generic.Inumerable<string>>".
De que maneira eu poderia fazer a chamada da classe no controller
corretamente?
Interface:
public interface IAcess : IDisposable
{
IEnumerable<Project> GetProjects();
Project GetProject(int id);
void AddProject(Project item);
void DeleteProject(int id);
void UpdateProject(Project item);
void Save();
}
Classe:
public class Acess : IAcess
{
private Project project = new Project();
private StreamerContext context;
public Acess(StreamerContext streamer)
{
this.context = streamer;
}
public IEnumerable<Project> GetProjects()
{
return context.Project.ToList();
}
}
Controller:
public ActionResult<IEnumerable<string>> Get()
{
var projects = from project in _acess.GetProjects()
select project;
return projects;
}