public IEnumerable <Models.MessageBoard> GetMessageBoards(Guid eventId) { IEnumerable <Models.MessageBoard> resultSet; using (var uow = _db.GetTransaction()) { resultSet = _db.Query <Models.MessageBoard>("WHERE EventId = @0", eventId); uow.Complete(); } return(resultSet); }
public IEnumerable <Models.Rsvp> GetAll() { IEnumerable <Models.Rsvp> result; using (var uow = _db.GetTransaction()) { result = _db.Query <Models.Rsvp>(""); uow.Complete(); } return(result); }
public IEnumerable <Models.Guest> GetFeaturedGuests(Guid eventId) { IEnumerable <Models.Guest> guests; using (var uow = _db.GetTransaction()) { guests = _db.Query <Models.Guest>("WHERE EventId = @0 AND IsFeatured = 1", eventId); uow.Complete(); } return(guests); }
private IEnumerable <Guid> GetUserEventIds(Guid userId) { IEnumerable <Guid> result; using (var uow = _db.GetTransaction()) { result = _db.Query <Guid>( @"SELECT e.EventId FROM core.UserEventMapping AS e INNER JOIN core.Users AS u ON e.UserId = e.EventId WHERE u.UserId = @0", userId); uow.Complete(); } return(result); }
public IEnumerable <Guid> GetEventIdsUserHasAccessTo(Guid userId) { IEnumerable <Guid> eventIds = new List <Guid>(); using (var uow = _db.GetTransaction()) { eventIds = _db.Query <Guid>(@"SELECT EventId FROM core.UserEventMapping WHERE UserId = @0", userId); uow.Complete(); } return(eventIds); }