コード例 #1
0
        /// <summary>
        /// Creates a new Building, as well as a Building Manager
        /// </summary>
        /// <param name="firstName">The First Name of the Building Manager</param>
        /// <param name="lastName">The Last Name of the Building Manager</param>
        /// <param name="dob">The Date of Birth of the Building Manager</param>
        /// <param name="phone">The Phone of the Building Manager</param>
        /// <param name="userId">The Id of the User that is going to connecte to the Building Manager</param>
        /// <param name="buildingName">The Name of the new Building</param>
        /// <param name="address">The Address of the new Building</param>
        /// <returns>Returns an Interface of the newly created Building</returns>
        public IBuilding CreateBuilding(string firstName, string lastName, DateTime dob, string phone, string userId, string buildingName, string address)
        {
            var building = _buildingRegister.CreateBuilding(buildingName, address);
            var bm       = _personRegister.CreateBuildingManager(firstName, lastName, dob, address, userId, building.Id);

            return(building);
        }