forked from VoodooShoes/eCommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added controllers, display names to models, cshtml views, and modifie…
…d intializer, DbContext, and Layout.
- Loading branch information
1 parent
2bb6baa
commit b7228b0
Showing
21 changed files
with
887 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using eCommerce.Data; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace eCommerce.Controllers | ||
{ | ||
public class ActorController : Controller | ||
{ | ||
private readonly AppDbContext _context; | ||
|
||
public ActorController(AppDbContext AppDbContext) | ||
{ | ||
_context = AppDbContext; | ||
} | ||
|
||
public IActionResult Index() | ||
{ | ||
var data = _context.Actors.ToList(); | ||
return View(data); | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using eCommerce.Data; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace eCommerce.Controllers | ||
{ | ||
public class CinemaController : Controller | ||
{ | ||
private readonly AppDbContext _context; | ||
|
||
public CinemaController(AppDbContext AppDbContext) | ||
{ | ||
_context = AppDbContext; | ||
} | ||
public async Task<IActionResult> Index() | ||
{ | ||
var allCinemas = await _context.Cinemas.ToListAsync(); | ||
return View(allCinemas); | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using eCommerce.Data; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace eCommerce.Controllers | ||
{ | ||
public class MovieController : Controller | ||
{ | ||
private readonly AppDbContext _context; | ||
|
||
public MovieController(AppDbContext AppDbContext) | ||
{ | ||
_context = AppDbContext; | ||
} | ||
public async Task<IActionResult> Index() | ||
{ | ||
var allMovies = await _context.Movies.Include(n => n.Cinemas).OrderBy(n => n.Name).ToListAsync(); | ||
return View(allMovies); | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using eCommerce.Data; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace eCommerce.Controllers | ||
{ | ||
public class ProducerController : Controller | ||
{ | ||
private readonly AppDbContext _context; | ||
|
||
public ProducerController(AppDbContext AppDbContext) | ||
{ | ||
_context = AppDbContext; | ||
} | ||
public async Task<IActionResult> Index() | ||
{ | ||
var allProducers = await _context.Producers.ToListAsync(); | ||
return View(allProducers); | ||
} | ||
} | ||
} |
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.