public AuthRepository(XYZToDoSQLDbContext context, IJWTHelpers JWTHelpers, ICryptoHelpers cryptoHelpers, IMemberLicenseRepository licenses, SmtpClient smtpClient) { this.context = context; this.jwtHelpers = JWTHelpers; this.cryptoHelpers = cryptoHelpers; this.licenses = licenses; this.smtpClient = smtpClient; this.Configuration = new ConfigurationHelpers().Configuration; //Configuration["JWT:SecretKeyForTokenValidation:Key"]) }
int NoOfMessagesUnreadHelper(long privateTalkId, string thisMember, XYZToDoSQLDbContext context) { DateTimeOffset lastSeen = (context.PrivateTalkLastSeen.Where(pt => pt.PrivateTalkId == privateTalkId && pt.Visitor == thisMember).FirstOrDefault()?.LastSeen) ?? new DateTimeOffset(DateTime.MinValue, TimeSpan.Zero); int messageCount = context.PrivateTalkMessage.Where(ptm => ptm.PrivateTalkId == privateTalkId && ptm.Sender != thisMember && ptm.DateTimeSent > lastSeen). Select(qt => qt.MessageId).Count(); //messages belongs to others. if (messageCount > 0) { return(1); } else { return(0); } }
public PrivateTalkMessageRepository(XYZToDoSQLDbContext context) { this.context = context; }
public PrivateTalkTeamReceiverRepository(XYZToDoSQLDbContext context) { this.context = context; }
// XYZToDoSQLDbContext context2; public PrivateTalkRepository(XYZToDoSQLDbContext context) { this.context = context; //this.context2 = new XYZToDo.Models.DatabasePersistanceLayer.XYZToDoSQLDbContext(); }
public MemberLicenseRepository(XYZToDoSQLDbContext context) { this.context = context; }
public ProjectToDoRepository(XYZToDoSQLDbContext context) { this.context = context; }
public QuickTodoCommentRepository(XYZToDoSQLDbContext context) { this.context = context; }
public MemberRepository(XYZToDoSQLDbContext context, IJWTHelpers JWTHelpers, ICryptoHelpers cryptoHelpers) { this.context = context; this.jwtHelpers = JWTHelpers; this.cryptoHelpers = cryptoHelpers; }
public TeamMemberRepository(XYZToDoSQLDbContext context) { this.context = context; }
public MemberSettingRepository(XYZToDoSQLDbContext context) { this.context = context; }