Пример #1
0
        public async Task <Wagon> AddAsync(Wagon wagon)
        {
            _trainContext.Add(wagon);
            await _trainContext.SaveChangesAsync();

            return(wagon);
        }
Пример #2
0
        public async Task <Train> AddAsync(Train train)
        {
            _trainContext.Add(train);
            await _trainContext.SaveChangesAsync();

            return(train);
        }