public static ClientBuilding GetEntity(this ClientBuildingPrimitive primitive)
        {
            ClientBuilding result = new ClientBuilding();

                result.Id = primitive.Id;

                result.Client_Id = primitive.Client_Id;

                result.Building_Id = primitive.Building_Id;

                result.Deleted = primitive.Deleted;

                result.Deactivated = primitive.Deactivated;

                return result;
        }
Beispiel #2
0
        private void FixupClientBuilding(ClientBuilding previousValue)
        {
            if (previousValue != null && previousValue.Orders.Contains(this))
            {
                previousValue.Orders.Remove(this);
            }

            if (ClientBuilding != null)
            {
                if (!ClientBuilding.Orders.Contains(this))
                {
                    ClientBuilding.Orders.Add(this);
                }
                if (ClientBuilding_Id != ClientBuilding.Id)
                {
                    ClientBuilding_Id = ClientBuilding.Id;
                }
            }
            else if (!_settingFK)
            {
                ClientBuilding_Id = null;
            }
        }