public UserManager(Data.IUserRepository userRepository, IRepository <Data.LoginHistory> loginHistoryRepository, IMobileManager mobileManager) { _UserRepository = userRepository; _LoginHistoryRepository = loginHistoryRepository; _MobileManager = mobileManager; }
public UserManager(Data.IUserRepository userRepository, IRepository<Data.LoginHistory> loginHistoryRepository, IMobileManager mobileManager) { _UserRepository = userRepository; _LoginHistoryRepository = loginHistoryRepository; _MobileManager = mobileManager; }
public MobileManager( IRepository<Data.VerifyCode> verifyCodeRepository, IRepository<Data.SmsHistory> smsHistoryRepository, Data.IUserRepository userRepository) { _VerifyCodeRepository = verifyCodeRepository; _SmsHistoryRepository = smsHistoryRepository; _UserRepository = userRepository; }
public MobileManager( IRepository <Data.VerifyCode> verifyCodeRepository, IRepository <Data.SmsHistory> smsHistoryRepository, Data.IUserRepository userRepository) { _VerifyCodeRepository = verifyCodeRepository; _SmsHistoryRepository = smsHistoryRepository; _UserRepository = userRepository; }
public UserService(Data.User entity, Data.IUserRepository userRepository, IUserManager userManager) { if (entity == null) throw new FlhException(ErrorCode.NotExists, "用户不存在"); _LazyUser = new Lazy<Data.User>(() => entity); Uid = entity.uid; _UserRepository = userRepository; _UserManager = userManager; }
public UserService(Data.User entity, Data.IUserRepository userRepository, IUserManager userManager) { if (entity == null) { throw new FlhException(ErrorCode.NotExists, "用户不存在"); } _LazyUser = new Lazy <Data.User>(() => entity); Uid = entity.uid; _UserRepository = userRepository; _UserManager = userManager; }
public UserService(long uid, Data.IUserRepository userRepository, IUserManager userManager) { ExceptionHelper.ThrowIfNotId(uid, "uid"); Uid = uid; _UserRepository = userRepository; _UserManager = userManager; _LazyUser = new Lazy<Data.User>(() => { var entity = _UserRepository.Entities.FirstOrDefault(u => u.uid == uid); if (entity == null) throw new FlhException(ErrorCode.NotExists, "用户不存在"); return entity; }); }
public UserService(long uid, Data.IUserRepository userRepository, IUserManager userManager) { ExceptionHelper.ThrowIfNotId(uid, "uid"); Uid = uid; _UserRepository = userRepository; _UserManager = userManager; _LazyUser = new Lazy <Data.User>(() => { var entity = _UserRepository.Entities.FirstOrDefault(u => u.uid == uid); if (entity == null) { throw new FlhException(ErrorCode.NotExists, "用户不存在"); } return(entity); }); }
public MoviesController(Data.IMovieRepository movieRepository, Data.IUserRepository userRepository) { _movieRepository = movieRepository; _userRepository = userRepository; }