Пример #1
0
        public async Task DeleteAsync(LInkedInUserAuth parameters)
        {
            //var LinkedInUser = Uow.Repository<LinkedInUser>().FindByAsync(t=> t.LIUserId==parameters.LIUserId);
            await Uow.RegisterDeletedAsync(parameters);

            await Uow.CommitAsync();

            //throw new NotImplementedException();
        }
Пример #2
0
        public async Task <object> GetBy(LInkedInUserAuth parameters)
        {
            var user = await Uow.Repository <LinkedInUser>().FirstOrDefaultAsync(t => (t.LIEmailId == parameters.LIEmailId) || (t.LIMobileNumber == parameters.LIMobileNumber));

            if (user != null && PasswordHash.VerifySignature(parameters.Password, user.Password, user.Salt))
            {
                return(await Task.FromResult(user));
            }
            else
            {
                return(await Task.FromResult(0));
            }
            //throw new NotImplementedException();
        }
Пример #3
0
        public async Task AddAsync(LInkedInUserAuth entity)
        {
            PasswordResult passwordResult = PasswordHash.Encrypt(entity.Password);
            LinkedInUser   linkedInUser   = new LinkedInUser();

            linkedInUser.Password           = passwordResult.Signature;
            linkedInUser.Salt               = passwordResult.Salt;
            linkedInUser.LIFirstName        = entity.LIFirstName;
            linkedInUser.LILastName         = entity.LILastName;
            linkedInUser.LIRegistrationDate = entity.LIRegistrationDate;
            linkedInUser.IsActive           = entity.IsActive;
            linkedInUser.LIMobileNumber     = entity.LIMobileNumber;
            linkedInUser.LIEmailId          = entity.LIEmailId;
            await Uow.RegisterNewAsync(linkedInUser);

            await Uow.CommitAsync();
        }
Пример #4
0
 public HashSet <string> DeleteValidation(LInkedInUserAuth parameters)
 {
     return(ValidationMessages);
 }
Пример #5
0
        public async Task UpdateAsync(LInkedInUserAuth entity)
        {
            await Uow.RegisterDirtyAsync(entity);

            await Uow.CommitAsync();
        }
Пример #6
0
 public HashSet <string> UpdateValidation(LInkedInUserAuth entity)
 {
     return(ValidationMessages);
 }
Пример #7
0
        public async Task <object> GetAsync(LInkedInUserAuth parameters)
        {
            return(await Uow.Repository <LinkedInUser>().AllAsync());

            // throw new NotImplementedException();
        }