Beispiel #1
0
        public TransportModel CreateTransport(TransportModel transportModel)
        {
            var transport = new Transport();

            transport.TraMake         = transportModel.Make;
            transport.TraModel        = transportModel.Model;
            transport.TraRegistration = transportModel.Registration;

            using (var transaction = _transportRepository.Session.BeginTransaction())
            {
                _transportRepository.Save(transport);
                transaction.Commit();
            }

            return(new TransportModel(transport));
        }