//public IEnumerable<EscapeRoom> GetAllForOwner() { // ServiceLayer.EscRef.IEscapeRoom_Services Service = new ServiceLayer.EscRef.EscapeRoom_ServicesClient(); // List<EscapeRoom> ERList = new List<EscapeRoom>(); // EscapeRoom tempER; // foreach (var ER in Service.GetAllForOwner()) { // tempER = new EscapeRoom { // CleanTime = ER.cleanTime, // Description = ER.description, // EscapeRoomID = ER.escapeRoomID, // MaxClearTime = ER.maxClearTime, // Name = ER.name, // Price = ER.price, // Rating = ER.rating // }; // ERList.Add(tempER); // } // return ERList; //} //public EscapeRoom GetForOwner(int ER_ID) { // ServiceLayer.EscRef.IEscapeRoom_Services Service = new ServiceLayer.EscRef.EscapeRoom_ServicesClient(); // EscapeRoom ER; // Service.GetForOwner(ER_ID); // return ER; //} public List <EscapeRoom> GetAllForOwner() { ServiceLayer.EscRef.IEscapeRoom_Services Service = new ServiceLayer.EscRef.EscapeRoom_ServicesClient(); var escapeRooms = Service.GetAllForOwner(); return(GetClintsideEscapeRooms(escapeRooms)); }
public EscapeRoom GetForOwner(int ER_ID) { ServiceLayer.EscRef.IEscapeRoom_Services Service = new ServiceLayer.EscRef.EscapeRoom_ServicesClient(); try { var escapeRooms = Service.GetForOwner(ER_ID); EscapeRoom es; es = GetClientsideOneEscapeRoom(escapeRooms); return(es); } catch (NullReferenceException NE) { Console.WriteLine(NE); Console.ReadLine(); return(null); } }