public SecGroupModel Update(SecGroupModel entity) { var secGroup = _db.Update(Mapper.Map <SecGroup>(entity)); return(new SecGroupModel { SecGroupId = entity.SecGroupId }); }
public async Task <SecGroupModel> SaveAsync(SecGroupModel entity) { var secGroup = await _db.SaveAsync(Mapper.Map <SecGroup>(entity)); return(new SecGroupModel { SecGroupId = entity.SecGroupId }); }
public async Task <HttpResponseMessage> Delete(SecGroupModel data) { try { await _secGroup.DeleteAsync(data); } catch (Exception ex) { Common.MyLogger.Error(ex.Message + ex.StackTrace + ex.InnerException.ToString()); return(Request.CreateResponse(HttpStatusCode.BadRequest, "Update Error")); } return(Request.CreateResponse(HttpStatusCode.OK, "Data Updated")); }
public async Task DeleteAsync(SecGroupModel entity) { await _db.DeleteAsync(entity.SecGroupId); }
public void Delete(SecGroupModel entity) { _db.Delete(entity.SecGroupId); }