Inheritance: INotifyPropertyChanging, INotifyPropertyChanged
        public JsonResult Create(Album album)
        {
            Response.BufferOutput = true;
            try
            {
                repoAlbum.Create(album);
                repoAlbum.Save();
                //Created
                Response.StatusCode = 201;
                //Set Location header to absolute path of entity.
                Response.AddHeader("LOCATION", Request.Url.AbsoluteUri + "/" + album.id);
                return this.Json(new { success = true, data = album }, JsonRequestBehavior.DenyGet);

            }
            catch
            {
                return this.Json(new { success = false }, JsonRequestBehavior.DenyGet);

            }
        }
 partial void DeleteAlbum(Album instance);
 partial void UpdateAlbum(Album instance);
 partial void InsertAlbum(Album instance);
 public JsonResult Update(int id, Album album)
 {
     try
     {
         Album dbAlbum = repoAlbum.GetAlbum(id);
         dbAlbum.name = album.name;
         dbAlbum.artist = album.artist;
         repoAlbum.Save();
         return this.Json(new { success = true, data = album }, JsonRequestBehavior.DenyGet);
     }
     catch
     {
         return this.Json(new { success = false, data = "" }, JsonRequestBehavior.DenyGet);
     }
 }
 //Delete
 public void Delete(Album album)
 {
     db.Albums.DeleteOnSubmit(album);
 }
 //
 // Create
 public void Create(Album album)
 {
     db.Albums.InsertOnSubmit(album);
 }