Currently I am using aspnetboilerplate to enhance a project which include both mvc and web api, after port web api code to abp, I found the controller cannot return entity successfully, the code like below:
public IQueryable<SomeEnity> GetEntities()
{
return _repository.GetAll().Where(e => e.TagId == 1);
}
The exception from postman is popular:
The 'ObjectContent`1' type failed to serialize the response body for content type 'application/xml; charset=utf-8'.
After some searching, I get it work with introducing a SomeEntityDto (another class), because the entity number for the web api so many that I don't want introduce so many dto for each entity.
The question is: Why the same code work with original project (EF and ASP.NET MVC) but failed with abp framework? Any solution?
Note: I also tried this, but not work.