I am using ASP.NET core 2.2 for developing web apis. I have the following method in repository class:
public async Task<Articles> AddAsync(Articles article)
{
return await _context.Articles.AddAsync(article);
}
I am getting the below error:
Cannot implicitly convert type 'Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<Author.Command.Persistence.DBContextAggregate.Articles>' to 'Author.Command.Persistence.DBContextAggregate.Articles'
Here I am trying to use the AddAsync version to save the data.
Can anyone help me to provide their guidance to fix this issue?
Articles
class is just a normal model it should be enough. – Masson