public void TranslateSeatsDALtoSeatsContractData(Seats seatDAL, SeatsItemEntity seatContractData) { seatContractData.SeatNumber = seatDAL.seatNumber; seatContractData.SeatState = seatDAL.SeatState.stateName; seatContractData.TransportID = (int)seatDAL.transportId; }
public SeatsItemEntity[] GetSeats(int transportId) { List <SeatsItemEntity> sit = new List <SeatsItemEntity>(); Seats[] currentSeats = transportDalacess.GetSeats(transportId); SeatsItemEntity seatItem = new SeatsItemEntity(); foreach (Seats seatItemContractData in currentSeats) { seatItem = new SeatsItemEntity(); TranslateSeatsDALtoSeatsContractData(seatItemContractData, seatItem); sit.Add(seatItem); } return(sit.ToArray()); }