public ProjectsController(IGitBanDataContext dataContext, IGitHubAdapter gitHubAdapter) { CurrentDataContext = dataContext; _gitHub = gitHubAdapter; }
public AuthController(IGitHubAdapter gitHubAdapter, IGitBanDataContext dataContext) { _dataContext = dataContext; _gitHub = gitHubAdapter; }
private static User GetCurrentUser(IGitBanDataContext dataContext) { int userId; return Int32.TryParse(Thread.CurrentPrincipal.Identity.Name, out userId) ? dataContext.Users.SingleOrDefault(x => x.Id == userId) : null; }