/// <summary>
        /// Update
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static CatalogGroupQuantumGradeModel Update(CatalogGroupQuantumGradeModel model)
        {
            // get existed by name
            var existedEntity = GetUnique(model.GroupQuantumId, model.Grade);

            // check existed
            if (existedEntity == null || existedEntity.Id == model.Id)
            {
                // init new entity
                var entity = new cat_GroupQuantumGrade();

                // set entity props
                model.FillEntity(ref entity);

                // update
                return(new CatalogGroupQuantumGradeModel(cat_GroupQuantumGradeServices.Update(entity)));
            }

            // report name existed
            return(null);
        }
        /// <summary>
        /// Create
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static CatalogGroupQuantumGradeModel Create(CatalogGroupQuantumGradeModel model)
        {
            // get existed by name
            var existedEntity = GetUnique(model.GroupQuantumId, model.Grade);

            // check existed
            if (existedEntity == null)
            {
                // init entity
                var entity = new cat_GroupQuantumGrade();

                // get entity from db
                model.FillEntity(ref entity);

                // return
                return(new CatalogGroupQuantumGradeModel(cat_GroupQuantumGradeServices.Create(entity)));
            }

            // report name existed
            return(null);
        }