コード例 #1
0
 public RelationPersonAward UpdateRelationPersonAward(RelationPersonAward updateData)
 {
     throw new NotImplementedException();
 }
コード例 #2
0
 public async Task UpdateRelationPersonAward(RelationPersonAward updateData)
 {
     using (var context = new AF_Context())
     {
         try
         {
             RelationPersonAward rel = context.RelationsPersonAward.First(r => r.RelationPersonAwardId == updateData.RelationPersonAwardId);
             context.Entry(rel).CurrentValues.SetValues(updateData);
             await context.SaveChangesAsync();
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
コード例 #3
0
 public RelationPersonAward AddRelationPersonAward(RelationPersonAward newRelationPersonAward)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public async Task AddRelationPersonAward(RelationPersonAward newRelationPersonAward)
 {
     using (var context = new AF_Context())
     {
         try
         {
             context.RelationsPersonAward.Add(newRelationPersonAward);
             int recordsAffected = await context.SaveChangesAsync();
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }