public IHttpActionResult Post(ChargesType ChargesType) { if (!ModelState.IsValid) { return BadRequest(ModelState); } _ChargesTypeService.Create (ChargesType); return Created(ChargesType); }
public static ChargesType ToEntity(this ChargesTypeModel model, ChargesType destination) { return(AutoMapperConfiguration.Mapper.Map(model, destination)); }
public static ChargesTypeModel ToModel(this ChargesType entity) { return(AutoMapperConfiguration.Mapper.Map <ChargesType, ChargesTypeModel>(entity)); }