示例#1
0
        public void AddCategory(string Name)
        {
            int id = _dbContext.DictionaryConferenceCategory.Max(a => a.DictionaryConferenceCategoryId);

            id += 1;

            object Category = new DictionaryConferenceCategory {
                DictionaryConferenceCategoryId = id, DictionaryConferenceCategoryName = Name
            };

            _dbContext.Add(Category);
            _dbContext.SaveChanges();
        }