Created
December 2, 2016 05:45
-
-
Save elderfo/6a910372732a679b759866faac6f54ae to your computer and use it in GitHub Desktop.
Leak stopped
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Project.Data; // enternal dependency | |
namespace Project.Logic | |
{ | |
public class User | |
{ | |
// .. | |
public List<UserModel> GetAll() { | |
IEnumerable<User> users = _entities.Users; | |
// transform to userModels... | |
return userModels; | |
} | |
public IEnumerable<UserModel> GetUsersInGroup(int groupId) | |
{ | |
IEnumerable<User> users = _entities.Users.Where(user => user.Groups.Any(group => group.GroupId == groupId)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment