public int Save(BE.Manufacturer manufacturer) { ManufacturerRepository repository = new ManufacturerRepository(); if(manufacturer.ID > 0) return repository.Update(manufacturer); else return repository.Insert(manufacturer); }
public Guid Create(ManufacturerNewModel manufacturer) { var manufacturerEntity = mapper.Map <ManufacturerEntity>(manufacturer); return(manufacturerRepository.Insert(manufacturerEntity)); }