Exemplo n.º 1
0
        public Place GetPlace(int id)
        {
            Dal.PlaceEntity placeEntity = _placeRepository.GetById(id);

            Place place = placeEntity.ToDomainObject();

            return(place);
        }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
        public int AddPlace(Place place)
        {
            Dal.PlaceEntity placeEntity = place.ToEntity();

            return(_placeRepository.Insert(placeEntity));
        }