Пример #1
0
        public async Task <Todos> GetTodoById(string id)
        {
            var filter = Builders <Todos> .Filter.Where(x => x.Id == ObjectId.Parse(id));

            return(await _todoRepository.FindSingleByFilterDefinitionAsync(filter));
        }
Пример #2
0
        public async Task <Users> GetUserDetailByEmailId(string emailId)
        {
            var filter = Builders <Users> .Filter.Where(x => x.Email.ToLower() == emailId.ToLower() && x.IsActive && !x.IsDeleted);

            return(await _userRepository.FindSingleByFilterDefinitionAsync(filter));
        }