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
# https://github.com/ardalis/eshoponweb | |
# From a cmd prompt (not powershell) in C:\labfiles\eshoponweb\src\Web> run these commands one by one: | |
dotnet tool restore | |
SET ASPNETCORE_ENVIRONMENT=Production | |
dotnet ef database update -c catalogcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj |
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
<!-- Begin Mailchimp Signup Form --> | |
<link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css"> | |
<style type="text/css"> | |
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; } | |
/* Add your own Mailchimp form style overrides in your site stylesheet or in this style block. | |
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */ | |
</style> | |
<div id="mc_embed_signup"> | |
<form action="https://ardalis.us13.list-manage.com/subscribe/post?u=ddf5f72371bc4c837a6667f27&id=40af84bfa3" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> | |
<div id="mc_embed_signup_scroll"> |
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.Data.Entity; | |
using System.Net; | |
using System.Web.Mvc; | |
using MvcMovie.Core.Interfaces; | |
using MvcMovie.Infrastructure.Data; | |
using MvcMovie.Infrastructure.Data.Repositories; | |
using MvcMovie.Models; | |
namespace MvcMovie.Controllers |
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.Data; | |
using System.Data.Entity; | |
using System.Linq; | |
using System.Net; | |
using System.Web; | |
using System.Web.Mvc; | |
using MvcMovie.Models; |
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
public class MoviesController : Controller | |
{ | |
private readonly IMovieRepository _movieRepository; | |
public MoviesController(IMovieRepository movieRepository) | |
{ | |
_movieRepository = movieRepository; | |
} | |
public MoviesController() : this(new EfMovieRepository()) | |
{} |
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
------ Run test started ------ | |
Failed to configure settings for runsettings plugin 'VSTest Run Configuration' as it threw following exception: | |
'An error occurred while loading the settings. Error: Could not find 'RunSettings' node..' | |
Please contact the plugin author. | |
========== Run test finished: 2 run (0:00:06.830683) ========== |
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.IO; | |
using System.Linq; | |
namespace ExplicitDependencies | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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.IO; | |
using System.Linq; | |
namespace ImplicitDependencies | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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.Linq; | |
using StructureMap; | |
namespace ConsoleApplication1 | |
{ | |
/// <summary> | |
/// See http://stackoverflow.com/questions/6777671/setting-up-structure-map-in-a-c-sharp-console-application | |
/// Updated for SM 4: http://ardalis.com/using-structuremap-4-in-a-console-app | |
/// </summary> |
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; | |
namespace MvcApplication1.Controllers | |
{ | |
public interface IHelloService | |
{ |
NewerOlder