public Place GetPlace(int id) { Dal.PlaceEntity placeEntity = _placeRepository.GetById(id); Place place = placeEntity.ToDomainObject(); return(place); }
public static Place ToDomainObject(this Dal.PlaceEntity placeEntity) { if (placeEntity != null) { return(new Place { Id = placeEntity.PlaceId, Number = placeEntity.Number, WagonConfigId = placeEntity.WagonConfigId }); } else { return(null); } }
public int AddPlace(Place place) { Dal.PlaceEntity placeEntity = place.ToEntity(); return(_placeRepository.Insert(placeEntity)); }