Beispiel #1
0
        public async Task <MatHang> Create(MatHang enttity)
        {
            var mathang = _repositoryMatHang.FirstOrDefault(x => x.MaMH == enttity.MaMH);

            if (mathang != null)
            {
                throw new UserFriendlyException("Mat hang da ton tai");
            }
            return(await _repositoryMatHang.InsertAsync(enttity));
        }
Beispiel #2
0
 public void Update(MatHang enitity)
 {
     _repositoryMatHang.Update(enitity);
 }