Exemple #1
0
 public async Task <string> Create(AddUpdateWholeSellerDto dto)
 {
     return(await AddOneAsync(new WholeSeller
     {
         Name = dto.Name,
         Address = dto.Address,
         VATNo = dto.VATNo,
         CSTNo = dto.CSTNo,
         DrugLicenseNo = dto.DrugLicenseNo,
         TINNo = dto.TINNo,
         GSTINNo = dto.GSTINNo,
         ContactPersonNo = dto.ContactPersonNo,
     }, _userClaims.Id));
 }
Exemple #2
0
        public async Task <bool> Update(AddUpdateWholeSellerDto dto)
        {
            #region update filter

            var updateFilter = Builders <WholeSeller> .Update
                               .Set(x => x.Name, dto.Name)
                               .Set(x => x.Address, dto.Address)
                               .Set(x => x.VATNo, dto.VATNo)
                               .Set(x => x.CSTNo, dto.CSTNo)
                               .Set(x => x.DrugLicenseNo, dto.DrugLicenseNo)
                               .Set(x => x.GSTINNo, dto.GSTINNo)
                               .Set(x => x.TINNo, dto.TINNo)
                               .Set(x => x.ContactPersonNo, dto.ContactPersonNo);

            #endregion

            return(await UpdateOneAsync(dto.Id, updateFilter, _userClaims.Id));
        }