示例#1
0
 public UserManager(IUserRepository userRepository, ILandlordRepository landlordRepository, ITenantRepository tenantRepository, IPasswordHasher passwordHasher)
 {
     _userRepository = userRepository;
     _passwordHasher = passwordHasher;
     _landlordRepository = landlordRepository;
     _tenantRepository = tenantRepository;
 }
 public AddEditPropertyViewModel(ILandlordRepository landlordRepository)
 {
     CancelCommand           = new DelegateCommand(CancelCommandExecute);
     SaveCommand             = new DelegateCommand(SaveCommandExecute, SaveCommandCanExecute);
     this.landlordRepository = landlordRepository;
     ///TODO: read these from configurations
     this.MinimumAvailableFromDate = new DateTime(1900, 1, 1);
     this.MaximumAvailableFromDate = new DateTime(2040, 1, 1);
 }
 public TenantController(ILandlordRepository ll, IApartmentRepository a, 
                         ILocationRepository lo, ITenantRepository t, IContext con)
 {
     TRepo = t;
     AptRepo = a;
     LocRepo = lo;
     LLRepo = ll;
     context = con;
 }
 public LocationController(ILandlordRepository ll, IApartmentRepository a,
     ILocationRepository lo, ITenantRepository t, IContext con, IImageRepository img)
 {
     TRepo = t;
     AptRepo = a;
     LocRepo = lo;
     LLRepo = ll;
     context = con;
     imageRepo = img;
 }
        public PropertyService(IPropertyRepository propertyService, ILandlordRepository landlordRepository,
            IPropertySubmissionRepository propertySubmissionRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(propertyService).IsNotNull();
            Check.If(landlordRepository).IsNotNull();
            Check.If(propertySubmissionRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _propertyRepository = propertyService;
            _landlordRepository = landlordRepository;
            _propertySubmissionRepository = propertySubmissionRepository;
            _referenceGenerator = referenceGenerator;
        }
示例#6
0
 public LandlordController(ILandlordRepository repository)
 {
     this.repository = repository ?? throw new ArgumentNullException(nameof(repository));
 }
        public void Setup()
        {
            _mockDbSettings.Setup(x => x.ConnectionString).Returns("TestConectionString");
            _mockContext.Setup(x => x.Landlords).Returns(_mockDbSet.Object);
            _mockContext.Setup(x => x.SaveChanges()).Returns(1);
            _mockLandlordMapper.Setup(x => x.Map(It.IsAny<Landlord>(), It.IsAny<Landlord>())).Returns(true);

            _landlordRepository = new LandlordRepository(_mockContext.Object, _mockLandlordMapper.Object);
        }
示例#8
0
 public LandlordController()
 {
     _landLords    = new ConcurrentBag <LandLordViewModel>();
     _landlordRepo = new LandlordRepository();
 }
示例#9
0
 public LandlordListViewModel(ILandlordRepository landlordRepository)
 {
     this.landlordRepository = landlordRepository;
     AddPropertyCommand      = new DelegateCommand(AddPropertyCommandExecute, AddPropertyCommandCanExecute);
     EditPropertyCommand     = new DelegateCommand <Property>(EditPropertyCommandExecute);
 }
示例#10
0
 public LandlordController()
 {
     _landLords = new ConcurrentBag<LandLordViewModel>();
     _landlordRepo = new LandlordRepository();
 }
示例#11
0
 public LandlordService(ILandlordRepository landlordRepository)
 {
     _landlordRepository = landlordRepository;
 }