General clean up to the musicstore app

1. Removed many unncessary comments
2. Added comments to Startup.cs
3. Fixed some code comments across the app
4. Renamed Config.json -> LocalConfig.json to reflect the scenario
This commit is contained in:
Praburaj 2014-05-01 15:32:21 -07:00
parent 10a280580c
commit 3ae8b93e26
28 changed files with 79 additions and 64 deletions

View File

@ -39,6 +39,7 @@ namespace MusicStore.Controllers
// //
// GET: /Account/Login // GET: /Account/Login
[AllowAnonymous] [AllowAnonymous]
//Bug: https://github.com/aspnet/WebFx/issues/339
[HttpGet] [HttpGet]
public IActionResult Login(string returnUrl) public IActionResult Login(string returnUrl)
{ {
@ -77,7 +78,8 @@ namespace MusicStore.Controllers
// //
// GET: /Account/Register // GET: /Account/Register
[AllowAnonymous] [AllowAnonymous]
[HttpGet] //TODO: Do we need this. Without this I seem to be landing here irrespective of the HTTP verb? //Bug: https://github.com/aspnet/WebFx/issues/339
[HttpGet]
public IActionResult Register() public IActionResult Register()
{ {
return View(); return View();
@ -90,7 +92,7 @@ namespace MusicStore.Controllers
//[ValidateAntiForgeryToken] //[ValidateAntiForgeryToken]
public async Task<IActionResult> Register(RegisterViewModel model) public async Task<IActionResult> Register(RegisterViewModel model)
{ {
//Bug: https://github.com/aspnet/DataAnnotations/issues/21 //Bug: https://github.com/aspnet/WebFx/issues/247
//if (ModelState.IsValid == true) //if (ModelState.IsValid == true)
{ {
var user = new ApplicationUser() { UserName = model.UserName }; var user = new ApplicationUser() { UserName = model.UserName };
@ -112,6 +114,7 @@ namespace MusicStore.Controllers
// //
// GET: /Account/Manage // GET: /Account/Manage
//Bug: https://github.com/aspnet/WebFx/issues/339
[HttpGet] [HttpGet]
public async Task<IActionResult> Manage(ManageMessageId? message) public async Task<IActionResult> Manage(ManageMessageId? message)
{ {
@ -130,7 +133,7 @@ namespace MusicStore.Controllers
public async Task<IActionResult> Manage(ManageUserViewModel model) public async Task<IActionResult> Manage(ManageUserViewModel model)
{ {
ViewBag.ReturnUrl = Url.Action("Manage"); ViewBag.ReturnUrl = Url.Action("Manage");
//Bug: https://github.com/aspnet/DataAnnotations/issues/21 //Bug: https://github.com/aspnet/WebFx/issues/247
//if (ModelState.IsValid == true) //if (ModelState.IsValid == true)
{ {
var user = await GetCurrentUserAsync(); var user = await GetCurrentUserAsync();

View File

@ -22,6 +22,7 @@ namespace MusicStore.Controllers
// //
// GET: /Checkout/ // GET: /Checkout/
//Bug: https://github.com/aspnet/WebFx/issues/339
[HttpGet] [HttpGet]
public IActionResult AddressAndPayment() public IActionResult AddressAndPayment()
{ {
@ -31,9 +32,7 @@ namespace MusicStore.Controllers
// //
// POST: /Checkout/AddressAndPayment // POST: /Checkout/AddressAndPayment
//Bug: Using direct model binding until we have TryUpdateModel available.
[HttpPost] [HttpPost]
//public IActionResult AddressAndPayment(FormCollection values)
public async Task<IActionResult> AddressAndPayment(Order order) public async Task<IActionResult> AddressAndPayment(Order order)
{ {
var formCollection = await Context.Request.GetFormAsync(); var formCollection = await Context.Request.GetFormAsync();

View File

@ -42,8 +42,6 @@ namespace MusicStore.Controllers
if (album == null) if (album == null)
{ {
//Bug: Need method HttpNotFound() on Controller
//return HttpNotFound();
return new HttpStatusCodeResult(404); return new HttpStatusCodeResult(404);
} }
@ -90,8 +88,6 @@ namespace MusicStore.Controllers
if (album == null) if (album == null)
{ {
//Bug: Need method HttpNotFound() on Controller
//return HttpNotFound();
return new HttpStatusCodeResult(404); return new HttpStatusCodeResult(404);
} }
ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name", album.GenreId); ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name", album.GenreId);
@ -118,13 +114,13 @@ namespace MusicStore.Controllers
// //
// GET: /StoreManager/Delete/5 // GET: /StoreManager/Delete/5
//Bug: https://github.com/aspnet/WebFx/issues/339
[HttpGet] [HttpGet]
public IActionResult Delete(int id = 0) public IActionResult Delete(int id = 0)
{ {
Album album = db.Albums.Single(a => a.AlbumId == id); Album album = db.Albums.Single(a => a.AlbumId == id);
if (album == null) if (album == null)
{ {
//Bug: Missing Helper
return new HttpStatusCodeResult(404); return new HttpStatusCodeResult(404);
} }
return View(album); return View(album);

View File

@ -3,6 +3,9 @@ using System.Runtime.Versioning;
namespace Microsoft.Net.Runtime namespace Microsoft.Net.Runtime
{ {
/// <summary>
/// Service provided by the host containing application environment details.
/// </summary>
[AssemblyNeutral] [AssemblyNeutral]
public interface IApplicationEnvironment public interface IApplicationEnvironment
{ {

View File

@ -31,7 +31,7 @@ namespace MusicStore.Models
public virtual List<OrderDetail> OrderDetails { get; set; } public virtual List<OrderDetail> OrderDetails { get; set; }
/// <summary> /// <summary>
/// Bug: We use this to populate the order details. This should be removed once we have an actual DB with EF. /// TODO: Temporary hack to populate the orderdetails until EF does this automatically.
/// </summary> /// </summary>
public Album() public Album()
{ {

View File

@ -16,12 +16,4 @@ namespace MusicStore.Models
public class ApplicationUser : IdentityUser public class ApplicationUser : IdentityUser
{ {
} }
//public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
//{
// public ApplicationDbContext()
// : base("DefaultConnection")
// {
// }
//}
} }

View File

@ -23,13 +23,6 @@ namespace MusicStore.Models
return cart; return cart;
} }
//TODO: Not used by anyone. Not sure why we have this.
// Helper method to simplify shopping cart calls
//public static ShoppingCart GetCart(MusicStoreEntities db, Controller controller)
//{
// return GetCart(db, controller.HttpContext);
//}
public void AddToCart(Album album) public void AddToCart(Album album)
{ {
// Get the matching cart and album instances // Get the matching cart and album instances
@ -160,7 +153,6 @@ namespace MusicStore.Models
// Iterate over the items in the cart, adding the order details for each // Iterate over the items in the cart, adding the order details for each
foreach (var item in cartItems) foreach (var item in cartItems)
{ {
//Bug: Missing EF
//var album = _db.Albums.Find(item.AlbumId); //var album = _db.Albums.Find(item.AlbumId);
var album = _db.Albums.Single(a => a.AlbumId == item.AlbumId); var album = _db.Albums.Single(a => a.AlbumId == item.AlbumId);

View File

@ -8,6 +8,10 @@ using System.Threading.Tasks;
namespace MusicStore namespace MusicStore
{ {
/// <summary>
/// This demonstrates how the application can be launched in a K console application.
/// k run command in the application folder will invoke this.
/// </summary>
public class Program public class Program
{ {
private readonly IServiceProvider _hostServiceProvider; private readonly IServiceProvider _hostServiceProvider;
@ -19,7 +23,7 @@ namespace MusicStore
public Task<int> Main(string[] args) public Task<int> Main(string[] args)
{ {
//Add command line to the configuration source to read command line parameters. //Add command line configuration source to read command line parameters.
var config = new Configuration(); var config = new Configuration();
config.AddCommandLine(args); config.AddCommandLine(args);

View File

@ -31,22 +31,39 @@ public class Startup
{ {
app.UseServices(services => app.UseServices(services =>
{ {
//Add configuration as a service /* Adding IConfiguration as a service in the IoC to avoid instantiating Configuration again.
* Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources,
* then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely.
*/
var applicationEnvironment = app.ApplicationServices.GetService<IApplicationEnvironment>(); var applicationEnvironment = app.ApplicationServices.GetService<IApplicationEnvironment>();
var configuration = new Configuration(); var configuration = new Configuration();
configuration.AddJsonFile(Path.Combine(applicationEnvironment.ApplicationBasePath, "Config.json")); configuration.AddJsonFile(Path.Combine(applicationEnvironment.ApplicationBasePath, "LocalConfig.json"));
configuration.AddEnvironmentVariables(); //If configuration flows through environment we should pick that first configuration.AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values.
services.AddInstance<IConfiguration>(configuration); services.AddInstance<IConfiguration>(configuration);
//Bug: https://github.com/aspnet/Hosting/issues/20
services.AddInstance<ILoggerFactory>(new NullLoggerFactory()); services.AddInstance<ILoggerFactory>(new NullLoggerFactory());
//Add all MVC related services to IoC.
services.AddMvc(); services.AddMvc();
/*Add all EF related services to IoC.
Using an InMemoryStore in K until SQL server is available.*/
#if NET45 #if NET45
services.AddEntityFramework(s => s.AddSqlServer()); services.AddEntityFramework(s => s.AddSqlServer());
#else #else
services.AddEntityFramework(s => s.AddInMemoryStore()); services.AddEntityFramework(s => s.AddInMemoryStore());
#endif #endif
services.AddTransient<MusicStoreContext, MusicStoreContext>(); services.AddTransient<MusicStoreContext, MusicStoreContext>();
// File an issue trying to use IdentityUser/IdentityRole and open generic UserManager<>
/*
* Add all Identity related services to IoC.
* Using an InMemory store to store membership data until SQL server is available.
* Users created will be lost on application shutdown.
*/
//Bug: https://github.com/aspnet/Identity/issues/50
services.AddIdentity<ApplicationUser, IdentityRole>(s => services.AddIdentity<ApplicationUser, IdentityRole>(s =>
{ {
// Turn off password defaults since register error display blows up // Turn off password defaults since register error display blows up
@ -61,9 +78,12 @@ public class Startup
}); });
}); });
//ErrorPageOptions.ShowAll to be used only at development time. Not recommended for production. /* Error page middleware displays a nice formatted HTML page for any unhandled exceptions in the request pipeline.
* Note: ErrorPageOptions.ShowAll to be used only at development time. Not recommended for production.
*/
app.UseErrorPage(ErrorPageOptions.ShowAll); app.UseErrorPage(ErrorPageOptions.ShowAll);
//Serves static files in the application.
app.UseFileServer(); app.UseFileServer();
app.UseCookieAuthentication(new CookieAuthenticationOptions() app.UseCookieAuthentication(new CookieAuthenticationOptions()
@ -81,15 +101,23 @@ public class Startup
app.UseMvc(routes => app.UseMvc(routes =>
{ {
routes.MapRoute( routes.MapRoute(
null, null,
"{controller}/{action}", "{controller}/{action}",
new { controller = "Home", action = "Index" }); new { controller = "Home", action = "Index" });
}); });
//Populates the MusicStore sample data
SampleData.InitializeMusicStoreDatabaseAsync(app.ApplicationServices).Wait(); SampleData.InitializeMusicStoreDatabaseAsync(app.ApplicationServices).Wait();
//Creates a Store manager user who can manage the store.
CreateAdminUser(app.ApplicationServices).Wait(); CreateAdminUser(app.ApplicationServices).Wait();
} }
/// <summary>
/// Creates a store manager user who can manage the inventory.
/// </summary>
/// <param name="serviceProvider"></param>
/// <returns></returns>
private async Task CreateAdminUser(IServiceProvider serviceProvider) private async Task CreateAdminUser(IServiceProvider serviceProvider)
{ {
var configuration = serviceProvider.GetService<IConfiguration>(); var configuration = serviceProvider.GetService<IConfiguration>();

View File

@ -1,7 +1,7 @@
@model MusicStore.Models.LoginViewModel @model MusicStore.Models.LoginViewModel
@{ @{
//Bug: Need a way to specify the layout page in a single place //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Log in"; ViewBag.Title = "Log in";
} }
@ -51,7 +51,7 @@
</div> </div>
</div> </div>
@section Scripts { @section Scripts {
@*Bug : Script helpers are out of scope for alpha*@ @*TODO : Until script helpers are available, adding script references manually*@
@*@Scripts.Render("~/bundles/jqueryval")*@ @*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script> <script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>

View File

@ -1,5 +1,5 @@
@{ @{
//Bug: Need a way to specify the layout page in a single place //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Manage Account"; ViewBag.Title = "Manage Account";
} }
@ -14,7 +14,7 @@
</div> </div>
@section Scripts { @section Scripts {
@*Bug : Script helpers are out of scope for alpha*@ @*TODO : Until script helpers are available, adding script references manually*@
@*@Scripts.Render("~/bundles/jqueryval")*@ @*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script> <script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>

View File

@ -1,6 +1,6 @@
@model MusicStore.Models.RegisterViewModel @model MusicStore.Models.RegisterViewModel
@{ @{
//Bug: Need a way to specify the layout page in a single place //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Register"; ViewBag.Title = "Register";
} }
@ -39,7 +39,7 @@
} }
@section Scripts { @section Scripts {
@*Bug : Script helpers are out of scope for alpha*@ @*TODO : Until script helpers are available, adding script references manually*@
@*@Scripts.Render("~/bundles/jqueryval")*@ @*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script> <script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>

View File

@ -8,7 +8,7 @@
@Html.AntiForgeryToken() @Html.AntiForgeryToken()
<h4>Change Password Form</h4> <h4>Change Password Form</h4>
<hr /> <hr />
@*@Html.ValidationSummary()*@ @Html.ValidationSummary()
<div class="form-group"> <div class="form-group">
@Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" }) @Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" })
<div class="col-md-10"> <div class="col-md-10">

View File

@ -1,13 +1,13 @@
@model MusicStore.Models.Order @model MusicStore.Models.Order
@{ @{
//Bug: Need a way to specify the layout page in a single place //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Address And Payment"; ViewBag.Title = "Address And Payment";
} }
@section Scripts { @section Scripts {
@*Bug : Script helpers are out of scope for alpha*@ @*TODO : Until script helpers are available, adding script references manually*@
@*@Scripts.Render("~/bundles/jqueryval")*@ @*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script> <script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>

View File

@ -1,7 +1,7 @@
@model int @model int
@{ @{
//Bug: Need to have a way to specify an application level layout page //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Checkout Complete"; ViewBag.Title = "Checkout Complete";
} }

View File

@ -1,5 +1,5 @@
@{ @{
//Bug: Need a way to specify the layout page in a single place //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Home Page"; ViewBag.Title = "Home Page";
} }

View File

@ -1,5 +1,5 @@
@{ @{
//Bug: Need a way to specify the layout page in a single place //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Error"; ViewBag.Title = "Error";
} }

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title MVC Music Store</title> <title>@ViewBag.Title MVC Music Store</title>
@*Bug: No Style and Script helpers yet. Manually including the script files*@ @*TODO : Until script helpers are available, adding script references manually*@
@*@Styles.Render("~/Content/css") @*@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")*@ @Scripts.Render("~/bundles/modernizr")*@
<link rel="stylesheet" href="~/Content/bootstrap.min.css" /> <link rel="stylesheet" href="~/Content/bootstrap.min.css" />
@ -42,7 +42,7 @@
</footer> </footer>
</div> </div>
@*Bug: No script helpers yet*@ @*TODO : Until script helpers are available, adding script references manually*@
@*@Scripts.Render("~/bundles/jquery") @*@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")*@ @Scripts.Render("~/bundles/bootstrap")*@
<script src="~/Scripts/jquery-1.10.2.js"></script> <script src="~/Scripts/jquery-1.10.2.js"></script>

View File

@ -1,6 +1,6 @@
@model MusicStore.ViewModels.ShoppingCartViewModel @model MusicStore.ViewModels.ShoppingCartViewModel
@{ @{
//Bug: Need to have a way to specify an application level layout page //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Shopping Cart"; ViewBag.Title = "Shopping Cart";
} }

View File

@ -1,6 +1,6 @@
@model MusicStore.Models.Genre @model MusicStore.Models.Genre
@{ @{
//Bug: Need to have a way to specify an application level layout page //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Browse Albums"; ViewBag.Title = "Browse Albums";
} }

View File

@ -1,7 +1,7 @@
@model MusicStore.Models.Album @model MusicStore.Models.Album
@{ @{
//Bug: Need to have a way to specify an application level layout page //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Album - " + Model.Title; ViewBag.Title = "Album - " + Model.Title;
} }

View File

@ -1,6 +1,6 @@
@model IEnumerable<MusicStore.Models.Genre> @model IEnumerable<MusicStore.Models.Genre>
@{ @{
//Bug: Need to have a way to specify an application level layout page //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Store"; ViewBag.Title = "Store";
} }

View File

@ -1,8 +1,7 @@
@*Bug: Fully dependent on HTML helpers*@ @model MusicStore.Models.Album
@model MusicStore.Models.Album
@{ @{
//Bug: Need to have a way to specify an application level layout page //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Create"; ViewBag.Title = "Create";
} }
@ -71,7 +70,7 @@
</div> </div>
@section Scripts { @section Scripts {
@*Bug : Script helpers are out of scope for alpha*@ @*TODO : Until script helpers are available, adding script references manually*@
@*@Scripts.Render("~/bundles/jqueryval")*@ @*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script> <script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>

View File

@ -1,8 +1,7 @@
@*Bug: Dependent on Htmlhelpers*@ @model MusicStore.Models.Album
@model MusicStore.Models.Album
@{ @{
//Bug: Need to have a way to specify an application level layout page //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Delete"; ViewBag.Title = "Delete";
} }

View File

@ -1,7 +1,7 @@
@model MusicStore.Models.Album @model MusicStore.Models.Album
@{ @{
//Bug: Need to have a way to specify an application level layout page //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Details"; ViewBag.Title = "Details";
} }

View File

@ -1,7 +1,7 @@
@model MusicStore.Models.Album @model MusicStore.Models.Album
@{ @{
//Bug: Need to have a way to specify an application level layout page //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Edit"; ViewBag.Title = "Edit";
} }
@ -71,7 +71,7 @@
</div> </div>
@section Scripts { @section Scripts {
@*Bug : Script helpers are out of scope for alpha*@ @*TODO : Until script helpers are available, adding script references manually*@
@*@Scripts.Render("~/bundles/jqueryval")*@ @*@Scripts.Render("~/bundles/jqueryval")*@
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script> <script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>

View File

@ -13,7 +13,7 @@
} }
@{ @{
//Bug: Need to have a way to specify an application level layout page //TODO: Until we have a way to specify the layout page at application level.
Layout = "/Views/Shared/_Layout.cshtml"; Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Index"; ViewBag.Title = "Index";
} }