I have a project working with SQLServer & EF6. What I'm actually using its the .edmx model and POCO classes generated by a T4 template.
For instance:
Code: Select all
//POCO
public partial class Lists : IEntity
{
public int EntryId { get; set; }
public string ListName { get; set; }
public string Value { get; set; }
public string Text { get; set; }
public double Rank { get; set; }
}
//Repository
public virtual T GetById(int id)
{
return Dbset.Find(id);
}
I did try several combinations but nothing seems to work. I keep getting different errors but nothing work. Also a co-worker did try with no luck.
Is this even doable?
If yes, can you provide me any example or some directions?
If no, any suggestion what's the best way to go? (I was trying to avoid having 1 model per database)
Thanks!