public RelationPersonAward UpdateRelationPersonAward(RelationPersonAward updateData) { throw new NotImplementedException(); }
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; } } }
public RelationPersonAward AddRelationPersonAward(RelationPersonAward newRelationPersonAward) { throw new NotImplementedException(); }
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; } } }