コード例 #1
0
ファイル: ManufacturerBL.cs プロジェクト: yoorke/zrchiptuning
 public int Save(BE.Manufacturer manufacturer)
 {
     ManufacturerRepository repository = new ManufacturerRepository();
     if(manufacturer.ID > 0)
         return repository.Update(manufacturer);
     else
         return repository.Insert(manufacturer);
 }
コード例 #2
0
        public Guid Create(ManufacturerNewModel manufacturer)
        {
            var manufacturerEntity = mapper.Map <ManufacturerEntity>(manufacturer);

            return(manufacturerRepository.Insert(manufacturerEntity));
        }