コード例 #1
0
        BuildingModel IBuildingService.GetBuildingByLocation(decimal latitude, decimal longitude)
        {
            var buildings      = this.dbContext.Building.WhereActiveAccessibleBuilding(b => b.Latitude == latitude && b.Longitude == longitude);
            var buildingModels = new BuildingModelMapping().Map(buildings).ToList();

            this.LinkConsumptionWithBuilding(buildingModels);
            return(buildingModels.FirstOrDefault());
        }
コード例 #2
0
        BuildingModel IBuildingService.GetBuildingByID(int buildingID)
        {
            var buildings      = this.dbContext.Building.WhereActiveAccessibleBuilding(data => data.BuildingID == buildingID);
            var buildingModels = new BuildingModelMapping().Map(buildings).ToList();

            this.LinkConsumptionWithBuilding(buildingModels);
            return(buildingModels.FirstOrDefault());
        }