mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-02-18 14:16:26 +08:00
add login service
This commit is contained in:
25
OpenAuth.Infrastructure/Repository/UserRepository.cs
Normal file
25
OpenAuth.Infrastructure/Repository/UserRepository.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using OpenAuth.Domain.Interface;
|
||||
using OpenAuth.Domain.Model;
|
||||
|
||||
namespace OpenAuth.Infrastructure.Repository
|
||||
{
|
||||
public class UserRepository :BaseRepository, IUserRepository
|
||||
{
|
||||
public User FindBy(string username)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _Context.Users.First(e => e.Account == username);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user