コード例 #1
0
 public Size Add(Size size)
 {
     if (_sizeRepository.CheckContains(x => x.Name == size.Name))
     {
         throw new NameDuplicatedException("Tên không được trùng");
     }
     return(_sizeRepository.Add(size));
 }
コード例 #2
0
 public bool CheckContain(double width, double height, string unit)
 {
     return(_sizeRepository.CheckContains(n => n.Width == width && n.Height == height && n.Unit.Equals(unit)));
 }