Exemple #1
0
 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);
            }
        }
Exemple #3
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();
 }
Exemple #6
0
 public MemberLicenseRepository(XYZToDoSQLDbContext context)
 {
     this.context = context;
 }
 public ProjectToDoRepository(XYZToDoSQLDbContext context)
 {
     this.context = context;
 }
Exemple #8
0
 public QuickTodoCommentRepository(XYZToDoSQLDbContext context)
 {
     this.context = context;
 }
Exemple #9
0
 public MemberRepository(XYZToDoSQLDbContext context, IJWTHelpers JWTHelpers, ICryptoHelpers cryptoHelpers)
 {
     this.context       = context;
     this.jwtHelpers    = JWTHelpers;
     this.cryptoHelpers = cryptoHelpers;
 }
Exemple #10
0
 public TeamMemberRepository(XYZToDoSQLDbContext context)
 {
     this.context = context;
 }
 public MemberSettingRepository(XYZToDoSQLDbContext context)
 {
     this.context = context;
 }