public IQueryable<Models.AvailableExLocations_Result> AvailableExLocations(int id) { var output = new List<Models.AvailableExLocations_Result>(); using (var context = new Models.VtcContext()) { output.AddRange(context.AvailableExLocations(id)); } return output.AsQueryable(); }
public IQueryable<Models.AvailablePeople_Result> AvailableEmails(int id) { var output = new List<Models.AvailablePeople_Result>(); using (var context = new Models.VtcContext()) { output.AddRange(context.AvailablePeople(id).Where(p => !string.IsNullOrEmpty(p.Email))); } return output.AsQueryable(); }
public IQueryable<Models.AvailableRooms_Result> AvailableRooms(int meetingId, int buildingId) { var output = new List<Models.AvailableRooms_Result>(); using (var context = new Models.VtcContext()) { output.AddRange(context.AvailableRooms(meetingId, buildingId)); } return output.AsQueryable(); }
// GET api/event/5 public Event Get(int id) { using (var context = new Models.VtcContext()) { var result = context.Meetings.Find(id); if (result == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } return new Event(result); } return null; }
// GET api/kemtahtech/5 public KemtahTech Get(int id) { using (var context = new Models.VtcContext()) { var result = context.KemtahTeches.Find(id); if (result == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } return KemtahTech.GetKemtahTech(result); } return null; }
// POST api/values public HttpResponseMessage Post([FromBody] AvailableBadgeNumbersRequest request) { var output = new List<Models.AvailableBadgeNumbers_Result>(); using (var context = new Models.VtcContext()) { output.AddRange(context.AvailableBadgeNumbers(request.id,request.search,request.maxResults).AsEnumerable()); } return Request.CreateResponse(System.Net.HttpStatusCode.Created, output.AsQueryable()); }
// GET api/building/5 public State Get(int id) { using (var context = new Models.VtcContext()) { var result = context.Ref_State.Find(id); if (result == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } return State.GetState(result); } return null; }
// GET api/location/5 public Location Get(int id) { using (var context = new Models.VtcContext()) { var result = context.Locations.Find(id); if (result == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } return Location.GetLocation(result); } return null; }
// GET api/building/5 public Building Get(int id) { using (var context = new Models.VtcContext()) { var result = context.Buildings.Find(id); if (result == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } return Building.GetBuilding(result); } return null; }
// GET api/room public IQueryable<Room> Get() { var output = new List<Room>(); using (var context = new Models.VtcContext()) { foreach (var item in context.Rooms.OrderBy(r => r.Name)) { output.Add(Room.GetRoom(item)); } } return output.AsQueryable(); }
// GET api/building public IQueryable<State> Get() { var output = new List<State>(); using (var context = new Models.VtcContext()) { foreach (var item in context.Ref_State.OrderBy(b => b.Abbreviation)) { output.Add(State.GetState(item)); } } return output.AsQueryable(); }
// GET api/location public IQueryable<Location> Get() { var output = new List<Location>(); using (var context = new Models.VtcContext()) { foreach (var item in context.Locations) { output.Add(Location.GetLocation(item)); } } return output.AsQueryable(); }
// GET api/MeetingSeries public IQueryable<Series> Get() { var output = new List<Series>(); using (var context = new Models.VtcContext()) { foreach (var item in context.Series) { output.Add(Series.GetSeries(item)); } } return output.AsQueryable(); }
// GET api/building public IQueryable<Building> Get() { var output = new List<Building>(); using (var context = new Models.VtcContext()) { foreach (var item in context.Buildings.OrderBy(b => b.Name)) { output.Add(Building.GetBuilding(item)); } } return output.AsQueryable(); }
// GET api/person public IQueryable<Person> Get() { var output = new List<Person>(); using (var context = new Models.VtcContext()) { foreach (var item in context.People) { output.Add(Person.GetPerson(item)); } } return output.AsQueryable(); }
// GET api/kemtahtech public IQueryable<KemtahTech> Get() { var output = new List<KemtahTech>(); using (var context = new Models.VtcContext()) { foreach (var item in context.KemtahTeches) { output.Add(KemtahTech.GetKemtahTech(item)); } } return output.AsQueryable(); }
// GET api/meeting public IQueryable<Meeting> Get() { var output = new List<Meeting>(); using (var context = new Models.VtcContext()) { foreach (var item in context.Meetings) { output.Add(Meeting.GetMeeting(item)); } } return output.AsQueryable(); }