Пример #1
0
        public IActionResult Update(string id, [FromBody] YearMonthPayment yearMonthPaymentIn)
        {
            var yearMonthPayment = _yearMonthPaymentService.Get(id);

            if (yearMonthPayment == null)
            {
                return(NotFound());
            }

            _yearMonthPaymentService.Update(id, yearMonthPaymentIn);

            return(NoContent());
        }
 public void Update(string id, YearMonthPayment yearMonthPaymentIn) => _yearMonthPayments.ReplaceOneAsync(yearMonthPayment => yearMonthPayment.yearMonthPaymentId == id, yearMonthPaymentIn);
 public YearMonthPayment Create(YearMonthPayment yearMonthPayment)
 {
     _yearMonthPayments.InsertOne(yearMonthPayment);
     return(yearMonthPayment);
 }
Пример #4
0
        public ActionResult <YearMonthPayment> Create(YearMonthPayment yearMonthPayment)
        {
            _yearMonthPaymentService.Create(yearMonthPayment);

            return(yearMonthPayment);
        }