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
/*Note: if you don't make the model Boolean, you will get errors on Create Actions where you might not initially new up a model.*/ | |
@model Boolean? | |
<label> | |
@Html.CheckBox("", Model.HasValue && Model.Value) @ViewData.ModelMetadata.DisplayName | |
</label> |
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
@model dynamic | |
@foreach (ModelMetadata prop in ViewData.ModelMetadata.Properties | |
.Where(p => p.ShowForEdit)) | |
{ | |
if (prop.TemplateHint == "HiddenInput") | |
{ | |
@Html.Hidden(prop.PropertyName) | |
} | |
else |
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
using System; | |
using System.Collections.Generic; | |
using Microsoft.Practices.ServiceLocation; | |
using StructureMap; | |
namespace StructureMap.ServiceLocatorAdapter { | |
public class StructureMapServiceLocator : ServiceLocatorImplBase { | |
private IContainer container; | |
public StructureMapServiceLocator(IContainer container) { |
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
@model Boolean? | |
<div class="checkbox"> | |
<label> | |
@Html.CheckBox("", Model.HasValue && Model.Value, new{ng_model = Html.AngularBindingForModel()}) @ViewData.ModelMetadata.DisplayName | |
</label> | |
</div> | |
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
public MvcRegistry(Func<IContainer> containerFactory) | |
{ | |
For<BundleCollection>().Use(BundleTable.Bundles); | |
For<RouteCollection>().Use(RouteTable.Routes); | |
For<IIdentity>().Use(() => HttpContext.Current.User.Identity); | |
For<HttpSessionStateBase>() | |
.Use(() => new HttpSessionStateWrapper(HttpContext.Current.Session)); | |
For<HttpContextBase>() | |
.Use(() => new HttpContextWrapper(HttpContext.Current)); | |
For<HttpServerUtilityBase>() |
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
dom: "<'row'<'col-xs-6'<'toolbar'>><'col-xs-6'l>>" + | |
"<'row'<'col-xs-12't>>" + | |
"<'row'<'col-xs-6'i><'col-xs-6'p>>", |
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
using System; | |
using System.Data.Entity; | |
using Microsoft.AspNet.Identity; | |
using Microsoft.AspNet.Identity.EntityFramework; | |
using SpecsFor.Mvc; | |
using SpecsForDemo.Web.Models; | |
namespace SpecsForDemo.IntegrationSpecs | |
{ | |
public class SeedDataConfig : SpecsForMvcConfig |
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
using System; | |
using System.Data.Entity; | |
using Microsoft.AspNet.Identity; | |
using SpecsFor.Mvc; | |
using SpecsForDemo.Web.Models; | |
namespace SpecsForDemo.IntegrationSpecs | |
{ | |
public class SeedDataConfig : SpecsForMvcConfig | |
{ |
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<video controls="controls" width="640" height="480" autoplay="autoplay"> | |
<source src="Documents/Videos/BigBuckBunny_320x180.mp4" type="video/mp4" /> | |
</video> | |
</body> |
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
namespace MyWebApp | |
{ | |
using System.Web.Mvc; | |
using System.Web.Routing; | |
using Web.Infrastructure.Routing; | |
public class RouteConfig | |
{ | |
public static void RegisterRoutes(RouteCollection routes) | |
{ |
OlderNewer