public ActionResult Delete(Song song) { var DB = new BMContext(); try { song = DB.Songs.Find(song.SongID); DB.Songs.Remove(song); DB.SaveChanges(); return(View("Index", DB.Songs.ToList())); } catch { return(View("Edit", song)); } }
public ActionResult Delete(Member member) { var DB = new BMContext(); try { member = DB.Members.Find(member.MemberID); DB.Members.Remove(member); DB.SaveChanges(); return(View("Index", DB.Members.ToList())); } catch { return(View("Edit", member)); } }
public SongsController(BMContext context) { _context = context; }
public PurchasesController(BMContext context) { _context = context; }
public UsersController(BMContext context) { _context = context; }
public GenresController(BMContext context) { _context = context; }
public LoginRepository(BMContext context) { this.context = context; }
public EfProvider(BMContext context) { _context = context; }
public LoginController(BMContext context) { _context = context; }