Example #1
0
        public SecGroupModel Update(SecGroupModel entity)
        {
            var secGroup = _db.Update(Mapper.Map <SecGroup>(entity));

            return(new SecGroupModel {
                SecGroupId = entity.SecGroupId
            });
        }
Example #2
0
        public async Task <SecGroupModel> SaveAsync(SecGroupModel entity)
        {
            var secGroup = await _db.SaveAsync(Mapper.Map <SecGroup>(entity));

            return(new SecGroupModel {
                SecGroupId = entity.SecGroupId
            });
        }
Example #3
0
 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"));
 }
Example #4
0
 public async Task DeleteAsync(SecGroupModel entity)
 {
     await _db.DeleteAsync(entity.SecGroupId);
 }
Example #5
0
 public void Delete(SecGroupModel entity)
 {
     _db.Delete(entity.SecGroupId);
 }