Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is just an example... imagine this is on the server only. It's the
- // basic method that gets the list of clients.
- private IEnumerable<Client> GetClients()
- {
- var result = MyDataContext.Clients;
- return result.AsEnumerable();
- }
- // This method here is actually called by the user...
- public Client[] GetClientsForLoggedInUser()
- {
- var clients = GetClients().Where(client=> client.Owner == currentUser);
- return clients.ToArray();
- }
- private IQueryable<Client> GetClients()
- {
- var result = MyDataContext.Clients;
- return result.AsQueryable();
- }
Add Comment
Please, Sign In to add comment