Added functionality to create contact queue
This commit is contained in:
@@ -37,6 +37,22 @@ public class UsersRepository : BaseRepository
|
||||
return new Tuple<bool, User>(false, new User());
|
||||
}
|
||||
}
|
||||
|
||||
public Tuple<bool, User> Exists(string userId)
|
||||
{
|
||||
var allUsers = this.RetrieveAllUsers();
|
||||
var result = allUsers.FirstOrDefault(ea => ea.Id!.Equals(userId));
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
return new Tuple<bool, User>(true, result!);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Tuple<bool, User>(false, new User());
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateUser(User user)
|
||||
{
|
||||
this._bookCollection.InsertOne(user);
|
||||
|
||||
Reference in New Issue
Block a user