Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
Fixing another build break on 4.5 projects.
Browse files Browse the repository at this point in the history
  • Loading branch information
Praburaj committed Feb 25, 2015
1 parent 80727b1 commit 68bb5bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/MvcMusicStore.Spa/Controllers/StoreManagerController.cs
Expand Up @@ -29,9 +29,9 @@ public async Task<ActionResult> Create(Album album)
if (ModelState.IsValid)
{
_storeContext.Albums.Add(album);

await _storeContext.SaveChangesAsync();

return RedirectToAction("Index");
}

Expand All @@ -56,10 +56,10 @@ public async Task<ActionResult> Edit(Album album)
{
if (ModelState.IsValid)
{
_storeContext.Entry(album).SetState(EntityState.Modified);
_storeContext.Entry(album).State = EntityState.Modified;

await _storeContext.SaveChangesAsync();

return RedirectToAction("Index");
}

Expand Down
12 changes: 6 additions & 6 deletions src/MvcMusicStore/Controllers/StoreManagerController.cs
Expand Up @@ -24,7 +24,7 @@ public async Task<ActionResult> Index()
public async Task<ActionResult> Details(int id = 0)
{
var album = await _storeContext.Albums.FindAsync(id);

if (album == null)
{
return HttpNotFound();
Expand All @@ -46,9 +46,9 @@ public async Task<ActionResult> Create(Album album)
if (ModelState.IsValid)
{
_storeContext.Albums.Add(album);

await _storeContext.SaveChangesAsync();

return RedirectToAction("Index");
}

Expand All @@ -73,10 +73,10 @@ public async Task<ActionResult> Edit(Album album)
{
if (ModelState.IsValid)
{
_storeContext.Entry(album).SetState(EntityState.Modified);
_storeContext.Entry(album).State = EntityState.Modified;

await _storeContext.SaveChangesAsync();

return RedirectToAction("Index");
}

Expand Down

0 comments on commit 68bb5bd

Please sign in to comment.