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)); }
public bool CheckContain(double width, double height, string unit) { return(_sizeRepository.CheckContains(n => n.Width == width && n.Height == height && n.Unit.Equals(unit))); }