/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteTypeResponse response = new DeleteTypeResponse(); return(response); }
public DeleteTypeResponse Delete(int id) { var response = new DeleteTypeResponse(); try { var type = new Data.Entities.Type { Id = id }; DataContext.Types.Attach(type); DataContext.Entry(type).State = EntityState.Deleted; DataContext.SaveChanges(); response.IsSuccess = true; response.Message = "KPI type item has been deleted successfully"; } catch (DbUpdateException dbUpdateException) { response.Message = dbUpdateException.Message; } return(response); }