Ejemplo n.º 1
0
        /// <summary>
        /// 创建年级
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static async Task CreateGrade(string name)
        {
            using (var gradeSvc = new GradeService())
            {
                var maxOrder = await gradeSvc.GetAll().MaxAsync(m => m.Order);

                await gradeSvc.CreateAsync(new Grade()
                {
                    Name = name
                });
            }
        }