public void DeleteAsset() { using var dbContext = new ShellFishDbContext(); dbContext.Remove(SelectedAsset); dbContext.SaveChanges(); Assets.Remove(SelectedAsset); }
protected override void Save() { using var dbContext = new ShellFishDbContext(); dbContext.Blogposts.Add(Asset); dbContext.SaveChanges(); RaiseItemSavedEvent(); }