예제 #1
0
 public async Task <bool> AddActivityType(ActivityType activitytype)
 {
     try
     {
         await _db.Set <ActivityType>().AddAsync(activitytype);
     }
     catch (Exception e)
     {
         return(false);
     }
     return(true);
 }
예제 #2
0
 public async Task <bool> AddProjectUserRole(ProjectUserRole pur)
 {
     try
     {
         await _db.Set <ProjectUserRole>().AddAsync(pur);
     }
     catch (Exception e)
     {
         return(false);
     }
     return(true);
 }
예제 #3
0
 public async Task <bool> UpdateProject(Project project)
 {
     try
     {
         _db.Set <Project>().Update(project);
         _db.SaveChanges();
     }
     catch (Exception e)
     {
         return(false);
     }
     return(true);
 }
예제 #4
0
 public IQueryable <T> GetQuery()
 {
     return(DbContext.Set <T>());
 }