Created
November 29, 2016 16:37
-
-
Save GeorgeWL/12e548eae3ddc76cbede308b79a29771 to your computer and use it in GitHub Desktop.
this is the Recordings Controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using Forest.Data; | |
using Forest.Services; | |
using Forest.Services.Service; | |
using Forest.Services.IService; | |
namespace Forest.Controllers | |
{ | |
public class RecordingsController : Controller | |
{ | |
// GET: Recordings | |
private IMusicService _musicService; | |
public RecordingsController() | |
{ | |
_musicService = new MusicService(); | |
} | |
// GET: Music | |
public ActionResult Recording(int id) | |
{ | |
return View(_musicService.GetMusicRecording(id)); | |
} | |
// GET: Recordings/Details/5 | |
public ActionResult Details(int id) | |
{ | |
return View(); | |
} | |
// GET: Recordings/Create | |
public ActionResult Create() | |
{ | |
return View(); | |
} | |
// POST: Recordings/Create | |
[HttpPost] | |
public ActionResult Create(FormCollection collection) | |
{ | |
try | |
{ | |
// TODO: Add insert logic here | |
return RedirectToAction("Index"); | |
} | |
catch | |
{ | |
return View(); | |
} | |
} | |
// GET: Recordings/Edit/5 | |
public ActionResult Edit(int id) | |
{ | |
return View(); | |
} | |
// POST: Recordings/Edit/5 | |
[HttpPost] | |
public ActionResult Edit(int id, FormCollection collection) | |
{ | |
try | |
{ | |
// TODO: Add update logic here | |
return RedirectToAction("Index"); | |
} | |
catch | |
{ | |
return View(); | |
} | |
} | |
// GET: Recordings/Delete/5 | |
public ActionResult Delete(int id) | |
{ | |
return View(); | |
} | |
// POST: Recordings/Delete/5 | |
[HttpPost] | |
public ActionResult Delete(int id, FormCollection collection) | |
{ | |
try | |
{ | |
// TODO: Add delete logic here | |
return RedirectToAction("Index"); | |
} | |
catch | |
{ | |
return View(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment