public void AddValue(decimal idSchool, decimal idClassType, string nameClass, decimal boysAmount, decimal girlsAmount) { this.idSchool = idSchool; CheckCapacity(); CheckName(idSchool, nameClass, true); SchoolClass sc = new SchoolClass(); sc.idClass = FreeIndex; sc.idSchool = idSchool; sc.idClassType = idClassType; sc.nameClass = nameClass; sc.boysAmount = boysAmount; sc.girlsAmount = girlsAmount; EntitiesHolder.Entities.SchoolClass.AddObject(sc); EntitiesHolder.Entities.SaveChanges(); }
/// <summary> /// Deprecated Method for adding a new object to the SchoolClass EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToSchoolClass(SchoolClass schoolClass) { base.AddObject("SchoolClass", schoolClass); }
/// <summary> /// Create a new SchoolClass object. /// </summary> /// <param name="idSchool">Initial value of the idSchool property.</param> /// <param name="idClass">Initial value of the idClass property.</param> /// <param name="idClassType">Initial value of the idClassType property.</param> /// <param name="boysAmount">Initial value of the boysAmount property.</param> /// <param name="girlsAmount">Initial value of the girlsAmount property.</param> public static SchoolClass CreateSchoolClass(global::System.Decimal idSchool, global::System.Decimal idClass, global::System.Decimal idClassType, global::System.Decimal boysAmount, global::System.Decimal girlsAmount) { SchoolClass schoolClass = new SchoolClass(); schoolClass.idSchool = idSchool; schoolClass.idClass = idClass; schoolClass.idClassType = idClassType; schoolClass.boysAmount = boysAmount; schoolClass.girlsAmount = girlsAmount; return schoolClass; }