public static bool SetInstance(string login, string password, ISellerUnitOfWork unitOfWork) { if (_instance == null) { var employee = unitOfWork.EmployeeRepository.GetUserByLogin(login, password); if (employee != null && employee.Priority == 2) { Seller._instance = new Seller(employee.Id, employee.FirstName, employee.LastName, employee.Pasition, unitOfWork); return(true); } } return(false); }
private Seller(Guid id, string fName, string lName, string position, ISellerUnitOfWork unitOfwork) : base(id, fName, lName, position) { this._order = new Order(); this._unitOfWork = unitOfwork; }