c# 4.0 - Scope of extension methods -
i have ran strange problem regarding c# extension methods
i have 2 projects in solution have database layer call project.domain contains ef context etc , webui layer contains controllers etc.
this simple structure of tables
public class menu { public int menuid { get; set; } public bool isactive { get; set; } public icollection<menumember> menumembers { get; set; } } public class menumember { public int menumemberid { get; set; } public int menuid { get; set; } public string viewroute { get; set; } public bool isactive{ get; set; } } public class efdbcontext : dbcontext { public dbset<page> pages { get; set; } public dbset<menu > menus { get; set; } public dbset<menumember> menumembers{ get; set; } }
i want place extension methods on dbset<pages>
.
i plan use in web ui layer . no matter place extensions methods , can never see them when go repository.pages.(can't see custom extension )
please me here
Comments
Post a Comment