public IHttpActionResult PostManufacturer(Manufacturer manufacturer) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _manufacturerRepository.InsertManufacturer(manufacturer); return(CreatedAtRoute("DefaultApi", new { id = manufacturer.Id }, manufacturer)); }
public Manufacturer InsertManufacturer(Manufacturer entity) { return(_iManufacturerRepository.InsertManufacturer(entity)); }
public async Task Insert(Manufacturer manufacturer) { _manufacturerRepo.InsertManufacturer(manufacturer); await _manufacturerRepo.Save(); }