public InvitationRepository(SoproplDbContext context, IOrganizationRepository orgRepo, INotificationRepository notificationRepo, ISmtpClientRepository smtpClientRepo) { this.orgRepo = orgRepo; this.smtpClientRepo = smtpClientRepo; this.notificationRepo = notificationRepo; this.context = context; }
public PhotoRepository(SoproplDbContext context, IOptions <CloudinarySettings> CloudinarySettings) { this.context = context; this.CloudinarySettings = CloudinarySettings; Account account = new Account( this.CloudinarySettings.Value.CloudName, this.CloudinarySettings.Value.ApiKey, this.CloudinarySettings.Value.ApiSecret ); this.cloudinary = new Cloudinary(account); }
public void OnAuthorization(AuthorizationFilterContext context) { var r = this.Roles; var p = this.Policy; SoproplDbContext dbocntext = (SoproplDbContext)context.HttpContext.RequestServices.GetService(typeof(SoproplDbContext)); Console.WriteLine(); Console.WriteLine(); var v = context.HttpContext.User.FindFirst(ClaimTypes.Name); var user = dbocntext.Users.Find(v); Console.WriteLine(user.UserName); Console.WriteLine(); Console.WriteLine(); context.Result = new UnauthorizedResult(); }
public MemberRepository(SoproplDbContext context, ITeamRepository teamRepo) { this.teamRepo = teamRepo; this.context = context; }
public UserRepository(SoproplDbContext context) { this.context = context; this.normalizer = new NameNormalizer(); }
public OrganizationRepository(SoproplDbContext context, IProjectRepository projectRepo) { this.projectRepo = projectRepo; this.nameNormalizer = new NameNormalizer(); this.context = context; }
public TeamRepository(SoproplDbContext context, IOrganizationRepository organizationRepo) { this.organizationRepo = organizationRepo; this.context = context; this.normalizer = new NameNormalizer(); }
public NotificationRepository(IHubContext <NotificationHub> hubContext, IMapper mapper, SoproplDbContext context) { this.context = context; this.mapper = mapper; this.hubContext = hubContext; }