OpenAuth.Net/OpenAuth.App/LoginApp.cs
2015-11-15 23:00:08 +08:00

30 lines
665 B
C#

using System;
using System.Collections.Generic;
using OpenAuth.Domain;
using OpenAuth.Domain.Interface;
namespace OpenAuth.App
{
public class LoginApp
{
private IUserRepository _repository;
public LoginApp(IUserRepository repository)
{
_repository = repository;
}
public void Login(string userName, string password)
{
var user = _repository.FindSingle(u =>u.Account ==userName);
if (user == null)
{
throw new Exception("Óû§ÕʺŲ»´æÔÚ");
}
// user.CheckLogin(password);
}
}
}