Skip to content

Instantly share code, notes, and snippets.

@kissarat
Created April 20, 2012 10:39
Show Gist options
  • Save kissarat/2427709 to your computer and use it in GitHub Desktop.
Save kissarat/2427709 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Johnny.Models;
using System.Data.Entity;
namespace Johnny.Data
{
public class ArticleData : Repository<Article>
{
public ArticleData(EntityContext context, DbSet<Article> dbSet)
: base(context, dbSet)
{
}
public override Repository<Article> Raw
{
get { return this as Repository<Article>; }
}
public IQueryable<Article> Fixup(IQueryable<Article> entitySet)
{
return entitySet.Include(a => a.Author);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment