public void Create(BusStopType busStopType) { try { var mapBusStopType = AutoMapper.Mapper.Map <Data.Entities.BusStopType>(busStopType); _busStopTypeRepository.Add(mapBusStopType); _unitOfWork.Commit(); } catch (Exception exception) { throw new FaultException(exception.Message); } }
public void Update(BusStopType busStopType) { try { var actualBusStopType = _busStopTypeRepository .FindBy(b => b.Id == busStopType.Id) .First(); actualBusStopType.Name = busStopType.Name; _unitOfWork.Commit(); } catch (Exception exception) { throw new FaultException(exception.Message); } }