public Task <VMInvitation> ReadAsync(string code) { var data = DbContext.InvitationCodes .Where(m => m.Id == code) .Select(VMInvitation.Read(DbContext)) .ToList() .SingleOrDefault(); return(Task.FromResult(data)); }
public Task <VMInvitationIndex> IndexAsync() { var invitations = DbContext.InvitationCodes .Select(VMInvitation.Read(DbContext)) .ToList(); var data = new VMInvitationIndex { Invitations = invitations }; return(Task.FromResult(data)); }