Exemple #1
0
        public async Task <RestorationType> Create(RestorationType entity)
        {
            var restorationType = _IRepositoryRestorationType.FirstOrDefault(Rt => Rt.Id == entity.Id);

            if (restorationType != null)
            {
                throw new UserFriendlyException("Restoration Type is already exist");
            }

            else
            {
                return(await _IRepositoryRestorationType.InsertAsync(entity));
            }
        }
Exemple #2
0
 public void Update(RestorationType entity)
 {
     _IRepositoryRestorationType.Update(entity);
 }