public Models.WorkPlaceType Post(Models.WorkPlaceType workplaceType) { if (workplaceType == null || !ModelState.IsValid) { throw new HttpException((int)HttpStatusCode.BadRequest, "Invalid Request"); } return(workplaceTypeService.AddUpdateWorkPlaceType(workplaceType.CreateFrom()).CreateFromm()); }
public Boolean Delete(Models.WorkPlaceType workplaceType) { if (workplaceType == null || !ModelState.IsValid) { throw new HttpException((int)HttpStatusCode.BadRequest, "Invalid Request"); } workplaceTypeService.DeleteWorkPlaceType(workplaceType.WorkPlaceTypeId); return(true); }