private void SetCorners(List<Coordinates> cornerCoordinates)
        {
            var averageX = _xSum/4;
            var averageY = _ySum/4;

            foreach (var coordinateSet in cornerCoordinates)
            {
                if (coordinateSet.XCoordinate > averageX && coordinateSet.YCoordinate > averageY)
                {
                    TopRightCorner  = coordinateSet;
                }
                else if (coordinateSet.XCoordinate < averageX && coordinateSet.YCoordinate > averageY)
                {
                    TopLeftCorner = coordinateSet;
                }
                else if (coordinateSet.XCoordinate < averageX && coordinateSet.YCoordinate < averageY)
                {
                    BottomLeftCorner = coordinateSet;
                }
                else if (coordinateSet.XCoordinate > averageX && coordinateSet.YCoordinate < averageY)
                {
                    BottomRightCorner = coordinateSet;
                }
            }
        }
 private void SaveCoordinates(Coordinates coordinates)
 {
     using (BuildingDbContext context = new BuildingDbContext())
     {
         context.Coordinates.AddOrUpdate(coordinates);
         context.SaveChanges();
     }
 }