Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (24 sloc) 749 Bytes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Data.Core.Infrastructure;
using Business.Entities;
namespace Data.Core.Repositories
{
public class ArticleRepository : RepositoryBase<Article>, IArticleRepository
{
public ArticleRepository(IDbFactory dbFactory)
: base(dbFactory) { }
public Article GetArticleByTitle(string articleTitle)
{
var _article = this.DbContext.ArticleSet.Where(b => b.Title == articleTitle).FirstOrDefault();
return _article;
}
}
public interface IArticleRepository : IRepository<Article>
{
Article GetArticleByTitle(string articleTitle);
}
}