public void DeleteAccount(long id) { using (Ms2DbContext Context = new Ms2DbContext()) { Account Account = Context.Accounts.Find(id); Context.Remove(Account); Context.SaveChanges(); } }
public void DeleteCharacter(long characterId) { using (Ms2DbContext context = new Ms2DbContext()) { Character character = context.Characters.FirstOrDefault(column => column.CharacterId == characterId); context.Remove(character); context.SaveChanges(); } }
public static void DeleteAccount(long id) { using (Ms2DbContext context = new Ms2DbContext()) { Account account = context.Accounts.Find(id); context.Remove(account); context.SaveChanges(); } }
public static void DeleteCharacter(long characterId, string characterName = "") { using (Ms2DbContext context = new Ms2DbContext()) { Character character = context.Characters.FirstOrDefault(a => (a.CharacterId == characterId) || (a.Name.ToLower() == characterName.ToLower())); context.Remove(character); context.SaveChanges(); } }
public static void DeleteSkill(long characterId, long skillId) { using (Ms2DbContext context = new Ms2DbContext()) { SkillTree skill = context.SkillTrees.Where(column => column.CharacterId == characterId) .FirstOrDefault(column => column.SkillId == skillId); context.Remove(skill); context.SaveChanges(); } }
public static void DeleteItem(long uid) { using (Ms2DbContext context = new Ms2DbContext()) { Item item = context.Items.Find(uid); context.Remove(item); context.SaveChanges(); } }
public void DeleteItem(long uid) { using (Ms2DbContext Context = new Ms2DbContext()) { Item Item = Context.Items.Find(uid); Context.Remove(Item); Context.SaveChanges(); } }
public void DeleteSkill(long characterId, long skillId) { using (Ms2DbContext Context = new Ms2DbContext()) { SkillTree Skill = Context.SkillTrees.Where(c => c.CharacterId == characterId) .FirstOrDefault(s => s.SkillId == skillId); Context.Remove(Skill); Context.SaveChanges(); } }