Esempio n. 1
0
        internal static BaseEntityRepo GetRepo <T>(EO.CivilWorksEntities context)
        {
            BaseEntityRepo repo = null;

            if (typeof(T) == typeof(BO.User))
            {
                repo = new UserRepository(context);
            }
            if (typeof(T) == typeof(BO.UserPasswordActivation))
            {
                repo = new InvitationRepository(context);
            }
            if (typeof(T) == typeof(BO.Project))
            {
                repo = new ProjectRepository(context);
            }
            if (typeof(T) == typeof(BO.Item))
            {
                repo = new  ItemRepository(context);
            }
            if (typeof(T) == typeof(BO.ProjectTeam))
            {
                repo = new ProjectTeamRepository(context);
            }
            if (typeof(T) == typeof(BO.ProjectReport))
            {
                repo = new  ProjectReportRepository(context);
            }
            return(repo);
        }
Esempio n. 2
0
 public ItemRepository(EO.CivilWorksEntities context) : base(context)
 {
 }
 public ProjectReportRepository(EO.CivilWorksEntities context) : base(context)
 {
 }
Esempio n. 4
0
 public BaseEntityRepo(EO.CivilWorksEntities context)
 {
     _context = context;
 }
 public InvitationRepository(EO.CivilWorksEntities context) : base(context)
 {
 }