public Pack GetPackData(Pack pack) { Pack pack1; using (var ent = new CommonEntitiesManager()) { ent.ContextOptions.LazyLoadingEnabled = false; pack1 = ent.Packs.FirstOrDefault(p => p.Code == pack.Code); } return pack1; }
/// <summary> /// Create a new Pack object. /// </summary> /// <param name="code">Initial value of the Code property.</param> /// <param name="enable">Initial value of the Enable property.</param> public static Pack CreatePack(global::System.Int32 code, global::System.Boolean enable) { Pack pack = new Pack(); pack.Code = code; pack.Enable = enable; return pack; }
/// <summary> /// Deprecated Method for adding a new object to the Packs EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToPacks(Pack pack) { base.AddObject("Packs", pack); }