Example #1
0
        private static F_nn_FlatModules getFMEnt(F_R_Flats flatEnt, F_R_Modules moduleEnt, Module module)
        {
            var fmEnt = flatEnt.F_nn_FlatModules.SingleOrDefault
                            (fm =>
                            fm.F_R_Flats == flatEnt &&
                            fm.F_R_Modules == moduleEnt &&
                            fm.LOCATION.Equals(module.LocationPoint) &&
                            fm.DIRECTION.Equals(module.Direction)
                            );

            if (fmEnt == null)
            {
                fmEnt = new F_nn_FlatModules()
                {
                    F_R_Flats   = flatEnt,
                    F_R_Modules = moduleEnt,
                    LOCATION    = module.LocationPoint,
                    DIRECTION   = module.Direction,
                    ANGLE       = module.Rotation
                };
                flatEnt.F_nn_FlatModules.Add(fmEnt);
            }
            return(fmEnt);
        }
 private static F_nn_FlatModules getFMEnt(F_R_Flats flatEnt, F_R_Modules moduleEnt, Module module)
 {
     var fmEnt = flatEnt.F_nn_FlatModules.SingleOrDefault
                          (fm =>
                                fm.F_R_Flats == flatEnt &&
                                fm.F_R_Modules == moduleEnt &&
                                fm.LOCATION.Equals(module.LocationPoint) &&
                                fm.DIRECTION.Equals(module.Direction)
                          );
     if (fmEnt == null)
     {
         fmEnt = new F_nn_FlatModules()
         {
             F_R_Flats = flatEnt,
             F_R_Modules = moduleEnt,
             LOCATION = module.LocationPoint,
             DIRECTION = module.Direction,
             ANGLE = module.Rotation
         };
         flatEnt.F_nn_FlatModules.Add(fmEnt);
     }
     return fmEnt;
 }