예제 #1
0
        internal CTI<bool> AddUpdateLevel(Levels level) {
            using (var levelEditorContext = new LevelEditorContext()) {
                level.UserAuthorID = _authorizedUser.ID;

                if (level.IsNew) {
                    levelEditorContext.LevelsDS.Add(level);
                } else {
                    levelEditorContext.LevelsDS.Update(level);
                }

                levelEditorContext.SaveChanges();

                return new CTI<bool>(true);
            }
        }
예제 #2
0
 public async Task<CTI<bool>> AddUpdateLevel(Levels level) {
     return await PUT<Levels, CTI<bool>>(level);
 }