Пример #1
0
        public LogisticServiceFare Update(LogisticServiceFare logisticFareNominalChanges)
        {
            _context.Entry(logisticFareNominalChanges).State = EntityState.Modified;
            _context.SaveChanges();

            return(logisticFareNominalChanges);
        }
Пример #2
0
        public LogisticServiceFare Add(LogisticServiceFare logisticFareNominal)
        {
            _context.LogisticServiceFarelItems.Add(logisticFareNominal);
            _context.SaveChanges();

            return(logisticFareNominal);
        }
Пример #3
0
        public LogisticServiceFare Delete(int id)
        {
            LogisticServiceFare logisticFareNominal = _context.LogisticServiceFarelItems.Find(id);

            if (logisticFareNominal != null)
            {
                _context.LogisticServiceFarelItems.Remove(logisticFareNominal);
                _context.SaveChanges();
            }

            return(logisticFareNominal);
        }