public void IncreaseArticleViews(int ArticleId)
{
context.Articles.FirstOrDefault(p => p.ArticleId == ArticleId).CountViews += 1;
context.SaveChanges();
}
var article = context.Articles.FirstOrDefault(p => p.ArticleId == ArticleId);
int countViews = article.newCountViews++;
context.Database.ExecuteSqlCommand("UPDATE dbo.Articles SET CountViews = {0} WHERE ArticleId = {1}", countViews , ArticleId);
var article = context.Articles.FirstOrDefault(p => p.ArticleId == ArticleId);
context.Entry(article).Property<int>("CountViews").CurrentValue++;
context.Entry(article).Property<int>("CountViews").IsModified = true;
context.SaveChanges();
var article = context.Articles.FirstOrDefault(p => p.ArticleId == ArticleId);
var article = context.Articles.FirstOrDefault(p => p.ArticleId == ArticleId).Select(p => p.CountViews);
int countViews = article++;
context.Database.ExecuteSqlCommand("UPDATE dbo.Articles SET CountViews = {0} WHERE ArticleId = {1}", countViews , ArticleId);