tag:blogger.com,1999:blog-31281612348716580862024-02-19T02:23:33.848-08:00ideDogsImplementing Solid Microsoft .NET Business SolutionsAnonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.comBlogger60125tag:blogger.com,1999:blog-3128161234871658086.post-49164048667422390102021-03-16T10:59:00.006-07:002021-03-18T07:47:20.303-07:00Steps C# Edge driver and Selenium Test Project<p>Create NUnit or MSTest project</p><p>In project manager, install pacakge: <b>Microsoft.Edge.SeleniumTools</b></p><p>Package will install:</p><p></p><ul style="text-align: left;"><li>Microsoft.Edge.SeleniumTools</li><li>Selenium.WebDriver</li><li>Selenium.Support</li><li>DotNetSeleniumExtras.PageObjects.Core </li></ul><span style="color: red;">**PageObjects were marked obsolete</span> - instead of <b>OpenQA.Selenium.Support.PageObjects</b> use <b>SeleniumExtras.PageObjects</b> namespace. <br /><p></p><p>Navigate to: <a href="https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/">WebDriver - Microsoft Edge Developer</a></p><p>Download latest Microsoft Edge Driver.</p><p></p><div class="separator" style="clear: both; text-align: left;"><a href="https://lh3.googleusercontent.com/-HIB7gCJ8fS0/YFDuF-CqyEI/AAAAAAAAM-c/aiZbeWw1drgYR0tTLj_ahrEg4_DETMY7gCLcBGAsYHQ/image.png" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="954" data-original-width="746" height="436" src="https://lh3.googleusercontent.com/-HIB7gCJ8fS0/YFDuF-CqyEI/AAAAAAAAM-c/aiZbeWw1drgYR0tTLj_ahrEg4_DETMY7gCLcBGAsYHQ/w342-h436/image.png" width="342" /></a></div><br />Open downloaded Microsoft Edge Driver zip file and save msedgedriver.exe to a local drive.<div><br /></div><div>Must change driver's name from msedgedriver.exe to MicrosoftWebDriver.exe. </div><div><br /></div><div><span style="color: red;">**</span>Changing name is a must or an error message:</div><div> <span style="color: red;">OpenQA.Selenium.DriverServiceNotFoundException : The file C:\Selenium\EdgeDriver\msedgedriver.exe does not exist. The driver can be downloaded at https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/</span></div><div><br /><div>Reference EdgeDriver within Test fixture.<p></p><pre style="background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHHWF0a9YJGv3eT1fU0b6wdaJuHVJ_D0bbfmacVU8g9FtgaMXlY7sfP1CP2cUmI_xkZQFxSzmxBy9QRlt7NzoCscqzNFrkzSYq4al72c0qomvL6Jymp3D4w6VuwLyRSt_mM9A6nmd8LsFE/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; overflow-wrap: normal; word-wrap: normal;"><br />
[Test]
public void Test1()
{
//Open Browser
IWebDriver webDriver = new EdgeDriver(@"C:\Selenium\EdgeDriver");
//Navigate to site
webDriver.Navigate().GoToUrl("http://yoopergreens.com");
//Assert.Pass();
}
</code>
</pre></div></div>
<div style="font-size: x-large;">
<div style="font-size: medium;">
<b><span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span></b></div>
<blockquote class="tr_bq" style="font-size: medium;">
<b><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”</span></b></blockquote>
<div style="font-size: medium;">
<b><b><i><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></i></b></b></div>
</div>nomadicdoghttp://www.blogger.com/profile/09448616980321976085noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-80326840065711311232021-03-09T10:02:00.002-08:002021-03-09T20:26:51.565-08:00TypeScript Recursion Code Snippet<h3><span style="font-weight: normal;"><span style="color: #45818e; font-size: large;">Reusable TypeScript / JavaScript Recursion Method</span></span></h3><h3><span style="font-weight: normal;"><span style="font-size: large;">Toggling opening and closing UI block level elements. Handles n - level.</span></span></h3><div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-viBvFH20CUs/YEezmIoge3I/AAAAAAAAM90/M8PfUzUcLXwhUZ020lwBB049Amvr0BjNwCLcBGAsYHQ/s414/menuToggle-1.JPG" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="263" data-original-width="414" src="https://1.bp.blogspot.com/-viBvFH20CUs/YEezmIoge3I/AAAAAAAAM90/M8PfUzUcLXwhUZ020lwBB049Amvr0BjNwCLcBGAsYHQ/s320/menuToggle-1.JPG" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: left;"><span style="font-size: large;">Targeting a button, toggles open showing its children elements.</span></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-lQWVQeaz4Vs/YEezcEwhacI/AAAAAAAAM9s/IqyYfgfcS-MivbMHi5AiUuQDOicxjvc8ACLcBGAsYHQ/s373/menuToggle-2.JPG" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="335" data-original-width="373" src="https://1.bp.blogspot.com/-lQWVQeaz4Vs/YEezcEwhacI/AAAAAAAAM9s/IqyYfgfcS-MivbMHi5AiUuQDOicxjvc8ACLcBGAsYHQ/s320/menuToggle-2.JPG" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div><span style="font-size: large;">Targeting another button, will hide all shown children elements.</span></div><div><span style="font-size: large;"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-gpBwC3oT3rU/YEezVjGsbBI/AAAAAAAAM9o/yD72lnakvMsmQPBe0u-oJJM-9COrQYYngCLcBGAsYHQ/s399/menuToggle-3.JPG" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="399" data-original-width="389" height="320" src="https://1.bp.blogspot.com/-gpBwC3oT3rU/YEezVjGsbBI/AAAAAAAAM9o/yD72lnakvMsmQPBe0u-oJJM-9COrQYYngCLcBGAsYHQ/s320/menuToggle-3.JPG" /></a></div><br /><div><br /><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><span style="font-size: x-large;"><br /></span></div><div><span style="font-size: x-large;"><br /></span></div><div><span style="font-size: x-large;">Hooking up UI</span></div><div><br />
<pre style="background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHHWF0a9YJGv3eT1fU0b6wdaJuHVJ_D0bbfmacVU8g9FtgaMXlY7sfP1CP2cUmI_xkZQFxSzmxBy9QRlt7NzoCscqzNFrkzSYq4al72c0qomvL6Jymp3D4w6VuwLyRSt_mM9A6nmd8LsFE/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; overflow-wrap: normal; word-wrap: normal;">
$(".toggleSeeds").click((function () {
var state = {},
currentId = null;
return function () {
var id: number = GetId(this.id);
ResetStates(this);
state[id] = typeof state[id] != "undefined" ? state[id] : {
collapsed: true,
toggleSeeds: $("#toggleSeeds_" + id + "> img")[0],
supplierSeeds: $("#supplierSeeds_" + id)
};
if (state[id].collapsed) {
state[id].supplierSeeds.show();
state[id].toggleSeeds.src = "/images/SVG/arrowhead-Down.svg";
if (currentId && currentId != id) {
state[currentId].supplierSeeds.hide();
state[currentId].collapsed = true;
state[currentId].toggleSeeds.src = "/images/SVG/arrowhead-Right.svg";
}
currentId = id;
} else {
state[id].supplierSeeds.hide();
state[id].toggleSeeds.src = "/images/SVG/arrowhead-Right.svg";
currentId = null;
}
state[id].collapsed = !state[id].collapsed;
}
}()));
</code></pre><span style="font-size: large;">
Tracking states
</span><pre style="background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHHWF0a9YJGv3eT1fU0b6wdaJuHVJ_D0bbfmacVU8g9FtgaMXlY7sfP1CP2cUmI_xkZQFxSzmxBy9QRlt7NzoCscqzNFrkzSYq4al72c0qomvL6Jymp3D4w6VuwLyRSt_mM9A6nmd8LsFE/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; overflow-wrap: normal; word-wrap: normal;">var ResetStates: (element: HTMLElement) => void = (function () {
var buttonState: HTMLElement[] = [];
return (element: HTMLElement) => {
var state: HTMLElement,
parent: HTMLElement,
stateLevels: RegExpMatchArray,
targetLevels: RegExpMatchArray,
sameLevel: boolean,
sameParent: boolean,
isChild: boolean,
switchedLevels: boolean;
if (buttonState.length == 0) {
buttonState.push(element);
return;
}
state = buttonState[buttonState.length - 1] ?? element;
parent = buttonState[0] ?? element;
stateLevels = state.id.match(/[0-9]+/g);
targetLevels = element.id.match(/[0-9]+/g);
sameParent = stateLevels[0] == targetLevels[0];
sameLevel = stateLevels.length == targetLevels.length;
isChild = (targetLevels.length > stateLevels.length) && sameParent;
switchedLevels = (parent.id != element.id) && !sameParent;
if (state.id != element.id) {
if (sameLevel) {
buttonState[buttonState.length - 1] = null;
state.click();
buttonState.push(element);
} else if (isChild) {
buttonState.push(element);
} else if (switchedLevels || sameParent) {
while (buttonState.length > 0) {
state = buttonState[buttonState.length - 1];
if (state != null) {
buttonState[buttonState.length - 1] = null;
state.click();
}
}
buttonState.push(element);
}
} else {
buttonState.pop();
}
}
}());
</code></pre>
<div style="font-size: x-large;">
<div style="font-size: medium;">
<b><span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span></b></div>
<blockquote class="tr_bq" style="font-size: medium;">
<b><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”</span></b></blockquote>
<div style="font-size: medium;">
<b><b><i><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></i></b></b></div>
</div></div>nomadicdoghttp://www.blogger.com/profile/09448616980321976085noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-13996234021928868092018-06-04T21:05:00.000-07:002018-06-04T21:05:20.352-07:00Ninject Setup IoC and Webapi<span style="font-size: large;">Ninject Setup IoC and Webapi</span><br />
Namespace<br />
<br />
<ul>
<li>Ninject.Mvc5</li>
<li>Ninject.Web.WebApi</li>
<li>Ninject.Web.Common.WebHost</li>
<li>Ninject.Web.Common</li>
<li>Ninject</li>
<li>WebActivatorEx</li>
</ul>
<br />
<br />
<span style="font-size: large;">Ninject.Mvc5 installs dependencies</span><br />
<br />
<ul>
<li>Ninject.Web.Common.WebHost</li>
<li>Ninject.Web.Common</li>
<li>Ninject.Web.Mvc</li>
<li>Ninject</li>
</ul>
<br />
<div>
<span style="font-size: large;">Making Ninject work with WebApi</span></div>
<div>
Installing package</div>
<div>
<ul>
<li>Ninject.Web.WebApi</li>
</ul>
</div>
<div>
<br /></div>
<div>
Will add dependency</div>
<div>
<ul>
<li>Ninject.Web.WebApi</li>
</ul>
<div>
Making Ninject auto executing</div>
<div>
Install package</div>
<div>
<ul>
<li>WebActivatorEx</li>
</ul>
</div>
<div>
<span style="font-size: large;">Below, file was created in App_Start or manually created</span></div>
</div>
<div>
<div>
<br /></div>
<div>
<br /></div>
<div>
[<span style="background-color: #cfe2f3;">assembly: WebActivatorEx.PreApplicationStartMethod(typeof(</span><span style="background-color: #d0e0e3;">YooperGreens.</span><span style="background-color: #cfe2f3;">App_Start.NinjectWebCommon), "Start")]</span></div>
<div>
<span style="background-color: #cfe2f3;">[assembly: WebActivatorEx.ApplicationShutdownMethodAttribute(typeof</span><span style="background-color: #d0e0e3;">(YooperGreens</span><span style="background-color: #cfe2f3;">.App_Start.NinjectWebCommon), "Stop")]</span></div>
<div>
<br /></div>
<div>
namespace YooperGreens.App_Start</div>
<div>
{</div>
<div>
using System;</div>
<div>
using System.Web;</div>
<div>
using System.Web.Http;</div>
<div>
using Microsoft.Web.Infrastructure.DynamicModuleHelper;</div>
<div>
<br /></div>
<div>
using Ninject;</div>
<div>
using Ninject.Web.Common;</div>
<div>
using Ninject.Web.Common.WebHost;</div>
<div>
using Ninject.Web.WebApi;</div>
<div>
using YooperGreens.Db;</div>
<div>
<br /></div>
<div>
public static class NinjectWebCommon</div>
<div>
{</div>
<div>
private static readonly Bootstrapper bootstrapper = new Bootstrapper();</div>
<div>
<br /></div>
<div>
/// <summary></div>
<div>
/// Starts the application</div>
<div>
/// </summary></div>
<div>
public static void Start()</div>
<div>
{</div>
<div>
DynamicModuleUtility.RegisterModule(typeof(OnePerRequestHttpModule));</div>
<div>
DynamicModuleUtility.RegisterModule(typeof(NinjectHttpModule));</div>
<div>
<br /></div>
<div>
bootstrapper.Initialize(CreateKernel);</div>
<div>
}</div>
<div>
<br /></div>
<div>
/// <summary></div>
<div>
/// Stops the application.</div>
<div>
/// </summary></div>
<div>
public static void Stop()</div>
<div>
{</div>
<div>
bootstrapper.ShutDown();</div>
<div>
}</div>
<div>
<br /></div>
<div>
/// <summary></div>
<div>
/// Creates the kernel that will manage your application.</div>
<div>
/// </summary></div>
<div>
/// <returns>The created kernel.</returns></div>
<div>
private static IKernel CreateKernel()</div>
<div>
{</div>
<div>
var kernel = new StandardKernel();</div>
<div>
try</div>
<div>
{</div>
<div>
kernel.Bind<Func<IKernel>>().ToMethod(ctx => () => new Bootstrapper().Kernel);</div>
<div>
kernel.Bind<IHttpModule>().To<HttpApplicationInitializationHttpModule>();</div>
<div>
<br /></div>
<div>
RegisterServices(kernel);</div>
<div>
<span style="background-color: #fff2cc;">GlobalConfiguration.Configuration.DependencyResolver = new NinjectDependencyResolver(kernel);</span></div>
<div>
return kernel;</div>
<div>
}</div>
<div>
catch</div>
<div>
{</div>
<div>
kernel.Dispose();</div>
<div>
throw;</div>
<div>
}</div>
<div>
}</div>
<div>
<br /></div>
<div>
/// <summary></div>
<div>
/// Load your modules or register your services here!</div>
<div>
/// </summary></div>
<div>
/// <param name="kernel">The kernel.</param></div>
<div>
private static void RegisterServices(IKernel kernel)</div>
<div>
{</div>
<div>
kernel.Bind<YooperGreensDbContext>().ToSelf().InRequestScope();</div>
<div>
kernel.Bind<IAccountViewModel>().To<AccountViewModel>();</div>
<div>
}</div>
<div>
}</div>
<div>
}</div>
<div style="font-size: x-large;">
<br /></div>
</div>
<div style="font-size: x-large;">
<div style="font-size: medium;">
<b><span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span></b></div>
<blockquote class="tr_bq" style="font-size: medium;">
<b><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”</span></b></blockquote>
<div style="font-size: medium;">
<b><b><i><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></i></b></b></div>
</div>
nomadicdoghttp://www.blogger.com/profile/09448616980321976085noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-29912503971015829972018-06-04T15:39:00.000-07:002018-06-04T15:42:15.378-07:00Missing System.Web.Http namespace<span style="font-size: large;">Quick fix</span><br />
<br />
Within Visual Studio package manager enter,<br />
<br />
<span style="background-color: #eff0f1; color: #242729; font-family: "consolas" , "menlo" , "monaco" , "lucida console" , "liberation mono" , "dejavu sans mono" , "bitstream vera sans mono" , "courier new" , monospace , sans-serif; font-size: 13px;">Update-Package -reinstall Microsoft.AspNet.WebApi.Core</span><br />
<span style="background-color: #eff0f1; color: #242729; font-family: "consolas" , "menlo" , "monaco" , "lucida console" , "liberation mono" , "dejavu sans mono" , "bitstream vera sans mono" , "courier new" , monospace , sans-serif; font-size: 13px;"><br /></span>
<span style="background-color: #eff0f1; color: #242729; font-family: "consolas" , "menlo" , "monaco" , "lucida console" , "liberation mono" , "dejavu sans mono" , "bitstream vera sans mono" , "courier new" , monospace , sans-serif; font-size: 13px;"><br /></span>
<b><span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span></b><br />
<blockquote class="tr_bq">
<b><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”</span></b></blockquote>
<b><b><i><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></i></b></b>nomadicdoghttp://www.blogger.com/profile/09448616980321976085noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-88136301309599776952018-06-03T09:36:00.005-07:002018-06-04T15:40:44.778-07:00Entityframework 6.2 Model Confuguration / Seed InitializerInstall package<br />
<br />
<ul>
<li>Install-Package EntityFramework</li>
</ul>
<br />
<span style="font-size: large;">Create Model Class</span><br />
<br />
public class Seed<br />
{<br />
public Guid SeedId { get; set; }<br />
public string Name { get; set; }<br />
public string Description { get; set; }<br />
public string Link { get; set; }<br />
public Germination Germination { get; set; }<br />
public string Supplier { get; set; }<br />
public int Count { get; set; }<br />
public decimal Price { get; set; }<br />
<br />
public ICollection<Order> Orders { get; set; }<br />
}<br />
<br />
public class Order<br />
{<br />
public Guid OrderId { get; set; }<br />
public decimal Shipping { get; set; }<br />
public decimal Tax { get; set; }<br />
public Seed Seed { get; set; }<br />
<br />
}<br />
<span style="font-size: large;">Create DbContext Class</span><br />
<span style="font-size: large;"><br /></span>
public interface IYooperGreensDbContext<br />
{<br />
DbSet<Seed> Seeds { get; set; }<br />
DbSet<Order> Orders { get; set; }<br />
<br />
}<br />
<br />
public class YooperGreensDbContext : DbContext, IYooperGreensDbContext<br />
{<br />
public YooperGreensDbContext()<br />
:base("yoopergreens")<br />
{<br />
}<br />
<br />
protected override void OnModelCreating(DbModelBuilder modelBuilder)<br />
{<br />
base.OnModelCreating(modelBuilder);<br />
<br />
ModelConfiguration configuration = new ModelConfiguration();<br />
<br />
modelBuilder.Configurations.Add(configuration.Seed);<br />
modelBuilder.Configurations.Add(configuration.Order);<br />
<br />
}<br />
public DbSet<Seed> Seeds { get; set; }<br />
public DbSet<Order> Orders { get; set; }<br />
}<br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">Create Configuration Classes for each model class</span><br />
<br />
public class OrderConfiguration: EntityTypeConfiguration<Order><br />
{<br />
public OrderConfiguration()<br />
{<br />
HasKey(o => o.OrderId);<br />
HasRequired(o => o.Seed).WithMany(o => o.Orders);<br />
}<br />
}<br />
<br />
public class SeedConfiguration : EntityTypeConfiguration<Seed><br />
{<br />
public SeedConfiguration()<br />
{<br />
HasKey(s => s.SeedId);<br />
}<br />
}<br />
<br />
<span style="font-size: large;">Create Centralized Configuration file</span><br />
<br />
public class ModelConfiguration<br />
{<br />
public SeedConfiguration Seed { get { return new SeedConfiguration(); } }<br />
public OrderConfiguration Order { get { return new OrderConfiguration(); } }<br />
}<br />
<br />
<span style="font-size: large;">Create a custom DB initializer to seed data into database:</span><br />
<br />
<ul>
<li>CreateDatabaseIfNotExists</li>
<li>DropCreateDatabaseIfModelChanges</li>
<li>DropCreateDatabaseAlways</li>
</ul>
<br />
<div>
<br /></div>
public class YooperGreensDbInitializer : DropCreateDatabaseAlways<YooperGreensDbContext><br />
{<br />
public YooperGreensDbInitializer()<br />
{<br />
}<br />
<br />
protected override void Seed(YooperGreensDbContext context)<br />
{<br />
<br />
IList<Seed> seeds = new List<Seed><br />
{<br />
new Seed {}<br />
};<br />
<br />
context.Seeds.AddRange(seeds);<br />
<br />
base.Seed(context);<br />
}<br />
}<br />
<br />
<span style="background-color: white; color: #494949; font-family: "verdana" , "geneva" , "tahoma" , "arial" , "helvetica" , sans-serif; text-align: justify;"><span style="font-size: large;">Set this DB initializer class in context class's constructor</span></span><br />
<span style="background-color: white; color: #494949; font-family: "verdana" , "geneva" , "tahoma" , "arial" , "helvetica" , sans-serif; font-size: 15px; text-align: justify;"><br /></span>
<br />
<div style="text-align: justify;">
<span style="color: #494949; font-family: "verdana" , "geneva" , "tahoma" , "arial" , "helvetica" , sans-serif;"><span style="font-size: 15px;"> public YooperGreensDbContext()</span></span></div>
<div style="text-align: justify;">
<span style="color: #494949; font-family: "verdana" , "geneva" , "tahoma" , "arial" , "helvetica" , sans-serif;"><span style="font-size: 15px;"> :base("yoopergreens")</span></span></div>
<div style="text-align: justify;">
<span style="color: #494949; font-family: "verdana" , "geneva" , "tahoma" , "arial" , "helvetica" , sans-serif;"><span style="font-size: 15px;"> {</span></span></div>
<div style="text-align: justify;">
<span style="color: #494949; font-family: "verdana" , "geneva" , "tahoma" , "arial" , "helvetica" , sans-serif;"><span style="font-size: 15px;"> Database.SetInitializer(new YooperGreensDbInitializer());</span></span></div>
<div style="text-align: justify;">
<span style="color: #494949; font-family: "verdana" , "geneva" , "tahoma" , "arial" , "helvetica" , sans-serif; font-size: 15px;"><br /></span></div>
<div style="text-align: justify;">
<span style="color: #494949; font-family: "verdana" , "geneva" , "tahoma" , "arial" , "helvetica" , sans-serif; font-size: 15px;"> Configuration.ProxyCreationEnabled = false;</span></div>
<span style="color: #494949; font-family: "verdana" , "geneva" , "tahoma" , "arial" , "helvetica" , sans-serif;"><span style="background-color: white; font-size: 15px; text-align: justify;"></span></span><br />
<div style="text-align: justify;">
<span style="color: #494949; font-family: "verdana" , "geneva" , "tahoma" , "arial" , "helvetica" , sans-serif;"><span style="font-size: 15px;"> }</span></span></div>
<div style="text-align: justify;">
<br /></div>
<span style="font-size: large;">File Structure</span><br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://4.bp.blogspot.com/-8-A0BnFsy6o/WxQY3ZKhBVI/AAAAAAAAMIQ/BUB39p9x9XAMF5kJG6YD-dWjmB-LQuBNwCLcBGAs/s1600/screenshot.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="305" data-original-width="265" src="https://4.bp.blogspot.com/-8-A0BnFsy6o/WxQY3ZKhBVI/AAAAAAAAMIQ/BUB39p9x9XAMF5kJG6YD-dWjmB-LQuBNwCLcBGAs/s1600/screenshot.JPG" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
<br />
<b><span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span></b><br />
<blockquote class="tr_bq">
<b><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”</span></b></blockquote>
<b><b><i><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></i></b></b>nomadicdoghttp://www.blogger.com/profile/09448616980321976085noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-32464129256637278222017-08-09T19:14:00.001-07:002018-06-13T16:01:06.104-07:00Self Referencing Loop Detected - Entity FrameworkError received:<br />
<span style="color: red;">self referencing loop detected for propert with type System.data.entity.dynamic.proxies</span><span style="color: black;">Occurs when trying to serialize the EF object collection directly.</span>Some ways correcting:<br />
<br />
Add to the db context constructor:<br />
<br />
<span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">Configuration.ProxyCreationEnabled = </span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">false</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">;</span></span><br />
<span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;"><br /></span></span>
<span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">Or (better way),</span></span><br />
<span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;"><br /></span></span>
<pre class="lang-cs prettyprint prettyprinted" style="background-color: #eff0f1; border: 0px; box-sizing: inherit; color: #393318; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"><code style="border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"><span class="typ" style="border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">HttpConfiguration</span><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> config </span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="typ" style="border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">GlobalConfiguration</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="typ" style="border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">Configuration</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">;</span><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
config</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="typ" style="border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">Formatters</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="typ" style="border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">JsonFormatter</span><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="typ" style="border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">SerializerSettings</span><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="typ" style="border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">ReferenceLoopHandling</span><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="pln" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"> </span><span class="typ" style="border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">Newtonsoft</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="typ" style="border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">Json</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="typ" style="border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">ReferenceLoopHandling</span><span class="pun" style="border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">.</span><span class="typ" style="border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">Ignore</span></code></pre>
<span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;"><br /></span></span>Other ways of correcting found at <a href="https://stackoverflow.com/questions/19467673/entity-framework-self-referencing-loop-detected#30203455" target="_blank">Stackoverflow</a><br />
<br />
<b><span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span><br />
</b><br />
<blockquote class="tr_bq">
<b><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.” </span></b></blockquote>
<b><b><i><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></i></b><br />
</b>nomadicdoghttp://www.blogger.com/profile/09448616980321976085noreply@blogger.com1tag:blogger.com,1999:blog-3128161234871658086.post-42464320741155208572017-08-06T07:04:00.002-07:002017-08-06T07:04:31.717-07:00Ninject IOC - ASP.NET WEB APINuget packages:<br />
<ul>
<li>Ninject.Web.WebApi</li>
<li>Ninject.Web.WebApi.WebHost</li>
<li>Ninject.MVC5</li>
</ul>
<br />
<span style="font-family: "georgia";"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><</span></span></span><span style="color: #a31515; font-family: "consolas"; font-size: x-small;"><span style="color: #a31515; font-family: "consolas"; font-size: x-small;"><span style="color: #a31515; font-family: "consolas"; font-size: x-small;">package</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">id</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">Ninject</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">version</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">3.2.0.0</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">targetFramework</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">net461</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> /></span></span></span><br />
<span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><br />
</span></span></span><br />
<span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> <</span></span></span><span style="color: #a31515; font-family: "consolas"; font-size: x-small;"><span style="color: #a31515; font-family: "consolas"; font-size: x-small;"><span style="color: #a31515; font-family: "consolas"; font-size: x-small;">package</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">id</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">Ninject.MVC5</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">version</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">3.2.1.0</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">targetFramework</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">net461</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> /></span></span></span><br />
<span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><br />
</span></span></span><br />
<span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> <</span></span></span><span style="color: #a31515; font-family: "consolas"; font-size: x-small;"><span style="color: #a31515; font-family: "consolas"; font-size: x-small;"><span style="color: #a31515; font-family: "consolas"; font-size: x-small;">package</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">id</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">Ninject.Web.Common</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">version</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">3.2.0.0</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">targetFramework</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">net461</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> /></span></span></span><br />
<span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><br />
</span></span></span><br />
<span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> <</span></span></span><span style="color: #a31515; font-family: "consolas"; font-size: x-small;"><span style="color: #a31515; font-family: "consolas"; font-size: x-small;"><span style="color: #a31515; font-family: "consolas"; font-size: x-small;">package</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">id</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">Ninject.Web.Common.WebHost</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">version</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">3.2.0.0</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">targetFramework</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">net461</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> /></span></span></span><br />
<span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><br />
</span></span></span><br />
<span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> <</span></span></span><span style="color: #a31515; font-family: "consolas"; font-size: x-small;"><span style="color: #a31515; font-family: "consolas"; font-size: x-small;"><span style="color: #a31515; font-family: "consolas"; font-size: x-small;">package</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">id</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">Ninject.Web.WebApi</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">version</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">3.2.4.0</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">targetFramework</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">net461</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> /></span></span></span><br />
<span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><br />
</span></span></span><br />
<span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> <</span></span></span><span style="color: #a31515; font-family: "consolas"; font-size: x-small;"><span style="color: #a31515; font-family: "consolas"; font-size: x-small;"><span style="color: #a31515; font-family: "consolas"; font-size: x-small;">package</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">id</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">Ninject.Web.WebApi.WebHost</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">version</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">3.2.4.0</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> </span></span></span><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;"><span style="color: red; font-family: "consolas"; font-size: x-small;">targetFramework</span></span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">=</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;">net461</span></span></span><span style="font-family: "consolas"; font-size: x-small;"><span style="font-family: "consolas"; font-size: x-small;">"</span></span><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"><span style="color: blue; font-family: "consolas"; font-size: x-small;"> /></span></span></span></span><br />
<br />
<strong><br />
</strong><br />
<strong>NinjectWebCommon CreateKernal method</strong><br />
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
private static void RegisterServices(IKernel kernel)
{
kernel.Bind<dbcontext>().ToSelf().InRequestScope();
kernel.Bind<myclass>().To<myclass>();
}
</code>
</pre>
</div>
<br />
<span style="font-family: "georgia";">Could not get property injection to work with Web API, so resorted using for property injection:</span><br />
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
private myProperty = DependencyResolver.Current.GetService<myclass>();
public myProperty2 = DependencyResolver.Current.GetService<myclass2>();
</code></pre>
</div>
<br />
<span style="font-family: "georgia";"><strong>
</strong>DependencyResolver is in the namespace: System.Web.MVC. This is based on the current IOC container, so swapping out IOC containers would not break code.</span><br />
<span style="font-family: Georgia;"><br /></span><br />
<b><span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span><br />
</b><br />
<blockquote class="tr_bq">
<b><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.” </span></b></blockquote>
<b><b><i><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></i></b><br />
</b>Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-57909927329137861952017-07-15T13:46:00.002-07:002017-07-16T22:56:33.594-07:00"StrongTypingException: The value for column IsPrimaryKey in table TableDetails is DBNull" Entity Framework 5 and MySql Server 5.7.9"StrongTypingException: The value for column IsPrimaryKey in table TableDetails is DBNull"<br />
<br />
For future reference on this particular issue with Entity Framework 5 and MySql Server 5.7.9. It has been reported as a <a href="https://bugs.mysql.com/bug.php?id=79163" target="_blank">Bug</a>. Below is the work around reported at <a href="https://stackoverflow.com/questions/33575109/mysql-entity-the-value-for-column-isprimarykey-in-table-tabledetails-is" target="_blank">Stackoverflow</a>.<br />
<br />
The work around solves the issue.<br />
<br />
I have included this fix, so when the bug has been corrected, I can revert back from this work around.<br />
<br />
<strong>Work Around</strong><br />
<span style="color: #45818e;"><span style="color: red;">**Use MySql Command Line Client. Will not work within Workbench.</span></span><br />
<span style="color: #134f5c;">use <database></span><br />
<span style="color: #45818e;"><span style="color: #134f5c;">set @@optimizer_switch='derived_merge=off';</span></span><br />
<span style="color: #134f5c;">SELECT </span><complete id="goog_672747221"><span style="color: #134f5c;">@@optimizer_switch\G</span></complete><br />
<a href="https://dev.mysql.com/doc/refman/5.7/en/switchable-optimizations.html" target="_blank">At MySql website</a> gives explanation.<br />
<br />
<b><span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span><br />
</b><br />
<blockquote class="tr_bq">
<b><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.” </span></b></blockquote>
<b><b><i><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></i></b><br />
</b><br />
<br />Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-76997731018356999922017-07-14T18:58:00.001-07:002017-08-06T07:18:47.536-07:00Visual Studio 2013 - Logging in as different user.When Visual Studio informs you that someone is already logged in and you are unable to login under a different user, I found this solution solved this problem that I was experiencing.<br />
<br />
<br />
There is a comment about this under this answer, but I think it's important to list it here. If you want to preserve your settings, export them first because they will be lost.<br /><br />
<strong>Preserve Visual Studio 2013 Settings:</strong><br />
<ul>
<li>Tools > Import and Export Settings...</li>
<li>Select Export selected environment settings.</li>
<li>Check ALL settings check box.</li>
<li>Enter backup filename and file's directory.</li>
<li>Click Finish</li>
</ul>
<div>
From MSDN forums - since I had to hunt around far too much to find the solution to this:</div>
<ol>
<li>Close Visual Studio</li>
<li>Start the Developer Command prompt installed with Visual Studio as an administrator.</li>
<li>type 'devenv /resetuserdata' ('wdexpress /resetuserdata' for Express SKUs)</li>
<li>Start Visual Studio Normally.</li>
</ol>
Do not remember where I found this solution, but I know that I had Googlized for the solution and almost sure that I landed at Stackoverflow.<br />
<br />
<b><span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span><br />
</b><br />
<blockquote class="tr_bq">
<b><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.” </span></b></blockquote>
<b><b><i><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></i></b><br />
</b>Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com2tag:blogger.com,1999:blog-3128161234871658086.post-674259757600698502017-07-14T18:45:00.001-07:002017-07-14T18:51:50.999-07:00The Compatibility Checker Package package did not load correctlyVisual Studio 2013 - Receiving Error: The Compatibility Checker Package package did not load correctly.<br />
<br />
Googlizing: found at <a href="https://stackoverflow.com/questions/17574089/microsoft-visual-studio-package-did-not-load-correctly" target="_blank">Stackoverflow</a> a solution solving the problem:<br />
<br />
I attempted:<br />
<ul>
<li>Deleted ComponentModelCache folder, which is located at:<br />
<strong><span class="pun">%</span><span class="pln">localappdata</span><span class="pun">%</span><span class="pln">\Microsoft\VisualStudio\1</span><span class="lit">2.0</span><span class="pln">\ComponentModelCache</span></strong></li>
<li><span class="pln">Deleted Extensions folder, which is located at:<br />
<strong><span class="pun">%</span><span class="pln">localappdata</span><span class="pun">%</span><span class="pln">\Microsoft\VisualStudio\1</span><span class="lit">2.0</span><span class="pln">\Extensions</span></strong></span></li>
</ul>
<ol>
<li><span class="pln"><span class="pln">Closed Visual Studio 2013</span></span></li>
<li><span class="pln"><span class="pln">Deleted both folders mentioned above.</span></span></li>
<li><span class="pln"><span class="pln">Restarted VS</span></span></li>
</ol>
<span class="pln"><span class="pln">*These attempts did not correct the problem, so I followed another suggestion.</span></span><br />
<ol>
<li><span class="pln"><span class="pln">Closed VS</span></span></li>
<li><span class="pln"><span class="pln">Opened, <strong>as Administrator</strong>, the Developer Command Prompt for VS2013 located at:<br />
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts</span></span></li>
<li><span class="pln"><span class="pln">At command line typed: <strong>devenv /setup</strong>.</span></span></li>
<li><span class="pln"><span class="pln"><span class="pln"><span class="pln">After typing in devenv /setup and hitting enter, the cursor moved down one line and blinked for about 30-45 seconds before returning back to a command prompt.</span></span></span></span></li>
<li><span class="pln"><span class="pln"><span class="pln"><span class="pln"><span class="pln"><span class="pln">Closing out Developer Command Prompt, VS was opened.</span></span></span></span></span></span></li>
</ol>
<span class="pln"><span class="pln">Everything is back to normal. No errors.<br /></span></span><span class="pln"><span class="pln">
</span></span><br />
<span class="pln"><span class="pln">I remember having a similar issue a while back. At that time all I had to do was delete the ComponentModelCache folder.</span></span><span class="pln"><span class="pln"><br />
</span></span><br />
<span class="pln"><span class="pln">This time I had to take an extra step running devenv /setup at the command prompt.</span></span><span class="pln"><span class="pln"><br />
</span></span><br />
<span class="pln"><span class="pln">A resourceful link:</span></span><br />
<span class="pln"><span class="pln"><a href="https://msdn.microsoft.com/en-us/library/ex6a2fad.aspx" target="_blank">/Setup (devenv.exe)</a></span></span><b><span style="font-family: "georgia" , "times new roman" , serif;"><br />
</span></b><br />
<b><span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span><br />
</b><br />
<blockquote class="tr_bq">
<b><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.” </span></b></blockquote>
<b><b><i><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></i></b><br />
</b>Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-84062589601204802142016-12-04T16:18:00.002-08:002016-12-04T16:25:29.550-08:00Selenium IDE, C# Visual Studio, and MSTest<h4>
<b>Within Visual Studio Package Manager install packages</b></h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-toji3F_evNQ/WESqE_MW2RI/AAAAAAAALKY/hJDKwXsGmSkf0xsPsgYsFXPMU2j_8BXmACLcB/s1600/Capture1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="424" src="https://2.bp.blogspot.com/-toji3F_evNQ/WESqE_MW2RI/AAAAAAAALKY/hJDKwXsGmSkf0xsPsgYsFXPMU2j_8BXmACLcB/s640/Capture1.JPG" width="640" /></a></div>
<b><br /></b>
<b>Within Visual Studio package manager</b><br />
<br />
<ul>
<li> Install-Package Selenium.RC (optional)</li>
<li> Install-Package Selenium.WebDriver</li>
<li> Install-Package Selenium.WebDriverBackedSelenium</li>
<li> Install-Package Selenium.Support</li>
</ul>
<br />
<b>Or, download zip file from:</b> <a href="http://docs.seleniumhq.org/download/" target="_blank">Selenium Webpage</a><br />
<br />
<b> </b>Extact zip file.<br />
Within Visual Studio add reference to these dlls<br />
<br />
<ul>
<li> Selenium.WebDriverBackedSelenium.dll</li>
<li> ThoughtWorks.Selenium.Core.dll</li>
<li> WebDriver.dll</li>
<li> WebDriver.Support.dll</li>
</ul>
<br />
Now, Visual Studio has reference Selenium<br />
<br />
<b>Download the Internet Explorer Driver Server from:</b> <a href="http://docs.seleniumhq.org/download/" target="_blank">Selenium Webpage</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-neY2Kkpoq9w/WESqFbveslI/AAAAAAAALKs/dM9m8e08W5QAugAHjVZcZZ7-oCJ3uK5fACEw/s1600/Capture3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="172" src="https://3.bp.blogspot.com/-neY2Kkpoq9w/WESqFbveslI/AAAAAAAALKs/dM9m8e08W5QAugAHjVZcZZ7-oCJ3uK5fACEw/s640/Capture3.JPG" width="640" /></a></div>
<br />
Download should be a single .exe file: <b>IEDriverServer.exe</b><br />
<br />
<div style="text-align: center;">
<span style="color: red; font-size: large;">Very Important that the IE Driver is able to find IEDriverServer.exe</span></div>
<br />
<br />
<ul>
<li>Move IEDriverServer.exe into MS Test project's bin\debug folder</li>
<li>Or, make sure IEDriverServer.exe absolute path is added to the Path environment variables.</li>
</ul>
<br />
<div style="text-align: center;">
<b>Start > right click Computer > properties > Advance system settings</b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-_Qt9vwtVzpY/WESqFbbew3I/AAAAAAAALKw/05DaAlh_OeoFt9bP0VorV1AkkhytytkbwCEw/s1600/Capture4.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="476" src="https://4.bp.blogspot.com/-_Qt9vwtVzpY/WESqFbbew3I/AAAAAAAALKw/05DaAlh_OeoFt9bP0VorV1AkkhytytkbwCEw/s640/Capture4.JPG" width="640" /></a></div>
<br />
<div style="text-align: center;">
<b>Environment Variables > scroll down to Path > Edit > add, at end of text, the folder's absolute path where IEDriverServer.exe is found.</b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-TwMIDJoGBnQ/WESqFZ_llZI/AAAAAAAALK0/pV4zajuQX4AR8d9atPt8KU7skFtBSeTIwCEw/s1600/Capture5.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="610" src="https://1.bp.blogspot.com/-TwMIDJoGBnQ/WESqFZ_llZI/AAAAAAAALK0/pV4zajuQX4AR8d9atPt8KU7skFtBSeTIwCEw/s640/Capture5.JPG" width="640" /></a></div>
<br />
<div style="text-align: left;">
<b>Install Selenium IDE Firefox plugin</b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-MiiAwjb8ndQ/WESqFWkijzI/AAAAAAAALK4/PWjGnbtgsfEpOqW9rsNyAj1capD5Lvt0ACEw/s1600/Capture6.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="188" src="https://4.bp.blogspot.com/-MiiAwjb8ndQ/WESqFWkijzI/AAAAAAAALK4/PWjGnbtgsfEpOqW9rsNyAj1capD5Lvt0ACEw/s640/Capture6.JPG" width="640" /></a></div>
<br />
<div style="text-align: center;">
<b>After installing plugin, open Firefox, click on Tools > Selenium IDE</b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-jTAQDX65Gj8/WESqFYnR1pI/AAAAAAAALK8/WD7eo_1AgNsdVzd3NUlvVcUbqG-bQUlvQCEw/s1600/Capture7.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="414" src="https://4.bp.blogspot.com/-jTAQDX65Gj8/WESqFYnR1pI/AAAAAAAALK8/WD7eo_1AgNsdVzd3NUlvVcUbqG-bQUlvQCEw/s640/Capture7.JPG" width="640" /></a></div>
<br />
<br />
<b>Using Selenium IDE, <span style="color: red;">record </span>some actions by clicking IDE's record button.</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-EcC7XzRC0nk/WESqFpA2wJI/AAAAAAAALLA/SokxFMy_vHUdX0P-MsD6ttmDh5Teh-5WQCEw/s1600/Capture8.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="454" src="https://3.bp.blogspot.com/-EcC7XzRC0nk/WESqFpA2wJI/AAAAAAAALLA/SokxFMy_vHUdX0P-MsD6ttmDh5Teh-5WQCEw/s640/Capture8.JPG" width="640" /></a></div>
<br />
<b>Export as C# / NUnit / WebDriver and save into project's folder</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-PfjcdEyo2kY/WESqFo9sh3I/AAAAAAAALLE/RuE9vtYCFQgHQHXsoky1Vf3kOQ00blKDQCEw/s1600/Capture9.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="580" src="https://4.bp.blogspot.com/-PfjcdEyo2kY/WESqFo9sh3I/AAAAAAAALLE/RuE9vtYCFQgHQHXsoky1Vf3kOQ00blKDQCEw/s640/Capture9.JPG" width="640" /></a></div>
<br />
<b><br /></b>
<b>Generated NUnit Test Class</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-yVcY7QQYbxo/WESqFD3rl0I/AAAAAAAALKk/SN7kOGAgmDQR37EzFAyX2jA0Ug-KqayJwCEw/s1600/Capture12.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="586" src="https://4.bp.blogspot.com/-yVcY7QQYbxo/WESqFD3rl0I/AAAAAAAALKk/SN7kOGAgmDQR37EzFAyX2jA0Ug-KqayJwCEw/s640/Capture12.JPG" width="640" /></a></div>
<br />
<b>After changer were made</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-xSjqWDbI3PM/WESwYvx2DJI/AAAAAAAALLQ/PcS8loQklbc3joKEv2lNeGfOnGatk79PACLcB/s1600/Capture13.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://1.bp.blogspot.com/-xSjqWDbI3PM/WESwYvx2DJI/AAAAAAAALLQ/PcS8loQklbc3joKEv2lNeGfOnGatk79PACLcB/s640/Capture13.JPG" width="386" /></a></div>
<br />
<b>Must Include reference to</b><br />
<ul>
<li><span style="color: red;">Microsoft.VisualStudio.TestTools.UnitTesting</span></li>
</ul>
<b>in projects.</b><br />
<b><br /></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-5tc13eLj8rc/WESqE5RVHpI/AAAAAAAALKc/kCKFKUY1TB0g560oSUtH4GLqRlmtX2XdwCEw/s1600/Capture.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="366" src="https://1.bp.blogspot.com/-5tc13eLj8rc/WESqE5RVHpI/AAAAAAAALKc/kCKFKUY1TB0g560oSUtH4GLqRlmtX2XdwCEw/s400/Capture.JPG" width="400" /></a></div>
<b><br /></b>
<br />
<b>Within Visual Studio, create a Unit Test Project</b><br />
<b><br /></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-CniNrgaq6YA/WESqE7A778I/AAAAAAAALKU/QP1ocqq7YwwY0FYA9mmVprllk5-YOD0CwCEw/s1600/Capture10.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="440" src="https://3.bp.blogspot.com/-CniNrgaq6YA/WESqE7A778I/AAAAAAAALKU/QP1ocqq7YwwY0FYA9mmVprllk5-YOD0CwCEw/s640/Capture10.JPG" width="640" /></a></div>
<b><br /></b>
<br />
<b>Remove UnitTest1.cs file</b><br />
<b><br /></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-y8K2mqcTyE8/WESqFCCKByI/AAAAAAAALKg/RX63Cj2BdEooN798lTzMAAMpit5Z2PnLQCEw/s1600/Capture11.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="335" src="https://4.bp.blogspot.com/-y8K2mqcTyE8/WESqFCCKByI/AAAAAAAALKg/RX63Cj2BdEooN798lTzMAAMpit5Z2PnLQCEw/s400/Capture11.JPG" width="400" /></a></div>
<b><br /></b>
<b><span style="font-family: "georgia" , "times new roman" , serif;"><br />
</span></b><br />
<b><span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span><br />
</b><br />
<blockquote class="tr_bq">
<b><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.” </span></b></blockquote>
<b><b><i><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></i></b><br />
</b>nomadicdoghttp://www.blogger.com/profile/09448616980321976085noreply@blogger.com2tag:blogger.com,1999:blog-3128161234871658086.post-37776435331368488762016-10-10T19:55:00.001-07:002016-10-10T20:29:26.411-07:00ASP.NET Bundling Rendering Media Attribute on Link Tag<br />
<div style="margin: 0in 0in 8pt;">
<span style="font-family: "calibri";">Reading this post about making a site mobile friendly, I
noticed ASP.NET bundling doesn’t render the media attribute on the HTML link
tag.</span></div>
<br />
<div style="margin: 0in 0in 8pt;">
<span style="font-family: "calibri";">Quick search, found a solution at stackoverflow: </span></div>
<br />
<div style="margin: 0in 0in 8pt;">
<a href="http://stackoverflow.com/questions/12042248/make-asp-net-bundling-specify-media-screen-for-css-bundle"><span style="color: #0000bf; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #0000BF;"><span style="color: windowtext;"><span style="font-family: "calibri";">http://stackoverflow.com/questions/12042248/make-asp-net-bundling-specify-media-screen-for-css-bundle</span></span></span></a></div>
<br />
<div style="margin: 0in 0in 8pt;">
<strong><span style="font-family: "calibri"; font-size: large;">From the posted solution, I changed it a little.</span></strong></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt;">!DOCTYPE</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: "consolas"; font-size: 9.5pt;">html</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt;">html</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: "consolas"; font-size: 9.5pt;">class</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">=" js "></span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt;">head</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt;">title</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">></</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt;">title</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: yellow; color: black; font-family: "consolas"; font-size: 9.5pt;">@</span><span style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Styles</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">.Render(</span><span style="background: white; color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"~/Styles/Base"</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">)</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;"></</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt;">head</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<br />
<div style="margin: 0in 0in 8pt;">
<span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;"><</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;">body</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;"> </span><span style="background: white; color: red; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;">class</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;">="master-body"</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;"> </span><span style="background: white; color: red; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;">id</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;">="index"></span></div>
<br />
<div style="margin: 0in 0in 8pt;">
<strong><span style="font-family: "calibri"; font-size: large;">To…</span></strong></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: yellow; color: black; font-family: "consolas"; font-size: 9.5pt;">@</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> com.dogPedaler.Models</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt;">!DOCTYPE</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: "consolas"; font-size: 9.5pt;">html</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt;">html</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: "consolas"; font-size: 9.5pt;">class</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">=" js "></span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt;">head</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;"><</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt;">title</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">></</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt;">title</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: yellow; color: black; font-family: "consolas"; font-size: 9.5pt;">@</span><span style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Styles</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">.RenderFormat(</span><span style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">BundlesFormats</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">.Screen,
</span><span style="background: white; color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"~/Styles/Base"</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">)</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;"></</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt;">head</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">></span></div>
<br />
<div style="margin: 0in 0in 8pt;">
<strong><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;"><</span><span style="background: white; color: maroon; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;">body</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;"> </span><span style="background: white; color: red; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;">class</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;">="master-body"</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;"> </span><span style="background: white; color: red; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;">id</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;">="index"></span></strong></div>
<span style="font-family: "calibri";"><br /></span><br />
<br />
<div style="margin: 0in 0in 8pt;">
<span style="font-family: "calibri";">The change includes the namespace to a class with a static
property call Screen:</span></div>
<br />
<div style="margin: 0in 0in 8pt;">
<span style="font-family: "calibri";"><span style="background: yellow; mso-highlight: yellow;">@</span><span style="color: #2e74b5; mso-themecolor: accent1; mso-themeshade: 191;">using </span>com.dogPedaler.Models</span></div>
<br />
<div style="margin: 0in 0in 8pt;">
<strong><span style="font-family: "calibri"; font-size: large;">The Created Class</span></strong></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">namespace</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> com.dogPedaler.Models</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">{</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">class</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">BundlesFormats</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">const</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> template = </span><span style="background: white; color: #a31515; font-family: "consolas"; font-size: 9.5pt;">@"<link
href=""{0}"" "</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">;</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">const</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> template2 = </span><span style="background: white; color: #a31515; font-family: "consolas"; font-size: 9.5pt;">@"rel=""stylesheet""
type=""text/css"" media=""{0}""
/>"</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">;</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">static</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> Print</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">get</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> template + </span><span style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">String</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">.Format(template2, </span><span style="background: white; color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"print"</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">); </span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">static</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> Screen</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">get</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> template + </span><span style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">String</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">.Format(template2, </span><span style="background: white; color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"Screen"</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">);</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">static</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> HandHeld</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">get</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> template + </span><span style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">String</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">.Format(</span><span style="background: white; color: #a31515; font-family: "consolas"; font-size: 9.5pt;">@"rel=""stylesheet""
type=""text/css"" media=""print""
/>"</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">, </span><span style="background: white; color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"handheld"</span><span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;">);</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<br />
<div style="margin: 0in 0in 8pt;">
<span style="background: white; color: black; font-family: "consolas"; font-size: 9.5pt; line-height: 105%;"><strong>}</strong></span></div>
<br />
<div style="margin: 0in 0in 8pt;">
<strong><span style="font-family: "calibri"; font-size: large;">Notice three properties</span></strong></div>
<br />
<ul>
<li><div style="margin: 0in 0in 8pt;">
<strong><span style="font-family: "calibri"; font-size: medium;">print</span></strong></div>
</li>
</ul>
<ul>
<li><div style="margin: 0in 0in 8pt;">
<strong><span style="font-family: "calibri"; font-size: medium;">Screen</span></strong></div>
</li>
</ul>
<ul>
<li><div style="margin: 0in 0in 8pt;">
<strong><span style="font-family: "calibri"; font-size: medium;">handheld</span></strong></div>
</li>
</ul>
<br />
<div style="margin: 0in 0in 8pt;">
<span style="font-family: "calibri";">There is a reason why the “S” is capitalized. This is a hack
for Windows mobile browsers and can be found at:</span></div>
<br />
<div style="margin: 0in 0in 8pt;">
<a href="https://perishablepress.com/the-5-minute-css-mobile-makeover/"><span style="color: blue; font-family: "calibri";">https://perishablepress.com/the-5-minute-css-mobile-makeover/</span></a><span style="font-family: "times new roman" , serif; line-height: 105%;"></span><br />
<div>
<span style="font-family: "times new roman" , serif; line-height: 105%;">
</span><b><span style="font-family: "georgia" , serif; line-height: 105%;"></span></b> </div>
<div>
<b><span style="font-family: "georgia" , serif; line-height: 105%;">
</span></b><span style="font-family: "times new roman" , serif; line-height: 105%;"></span> </div>
<div>
<span style="font-family: "times new roman" , serif; line-height: 105%;">
</span><strong><span style="font-family: "georgia" , serif; line-height: 105%;">This post is for the purpose of my notes only and sometimes a rant.</span></strong></div>
</div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt;">
<strong><span style="font-family: "georgia" , serif; font-size: 12pt;">“I
invented nothing new. I simply assembled the discoveries of other men behind
whom were centuries of work. Had I worked fifty or ten or even five years
before, I would have failed. So it is with every new thing. Progress happens
when all the factors that make for it are ready and then it is inevitable. To
teach that a comparatively few men are responsible for the greatest forward
steps of mankind is the worst sort of nonsense.” </span></strong></div>
<br />
<div style="line-height: normal; margin: 0in 0in 0pt;">
<em><b><span style="font-family: "georgia" , serif; font-size: 12pt;">Henry
Ford</span></b></em></div>
Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-66434100360043195922016-09-29T14:30:00.007-07:002016-09-29T15:41:39.250-07:00MVC Setup from Empty ASP.NET template<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 15">
<meta name=Originator content="Microsoft Word 15">
<link rel=File-List href="MVC1_files/filelist.xml">
<link rel=Edit-Time-Data href="MVC1_files/editdata.mso">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>deDoes Kirk deDogs</o:Author>
<o:LastAuthor>deDoes Kirk deDogs</o:LastAuthor>
<o:Revision>2</o:Revision>
<o:TotalTime>94</o:TotalTime>
<o:Created>2016-09-29T22:35:00Z</o:Created>
<o:LastSaved>2016-09-29T22:35:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>818</o:Words>
<o:Characters>4668</o:Characters>
<o:Lines>38</o:Lines>
<o:Paragraphs>10</o:Paragraphs>
<o:CharactersWithSpaces>5476</o:CharactersWithSpaces>
<o:Version>15.00</o:Version>
</o:DocumentProperties>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]-->
<link rel=themeData href="MVC1_files/themedata.thmx">
<link rel=colorSchemeMapping href="MVC1_files/colorschememapping.xml">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
DefSemiHidden="false" DefQFormat="false" DefPriority="99"
LatentStyleCount="371">
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 9"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="header"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footer"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index heading"/>
<w:LsdException Locked="false" Priority="35" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of figures"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope return"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="line number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="page number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of authorities"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="macro"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="toa heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 5"/>
<w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Closing"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Signature"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="true"
UnhideWhenUsed="true" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Message Header"/>
<w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Salutation"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Date"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Note Heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Block Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Hyperlink"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="FollowedHyperlink"/>
<w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Document Map"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Plain Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="E-mail Signature"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Top of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Bottom of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal (Web)"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Acronym"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Cite"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Code"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Definition"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Keyboard"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Preformatted"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Sample"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Typewriter"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Variable"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Table"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation subject"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="No List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Contemporary"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Elegant"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Professional"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Balloon Text"/>
<w:LsdException Locked="false" Priority="39" Name="Table Grid"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Theme"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" QFormat="true"
Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" QFormat="true"
Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" QFormat="true"
Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" QFormat="true"
Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" QFormat="true"
Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" QFormat="true"
Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" SemiHidden="true"
UnhideWhenUsed="true" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
<w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/>
<w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/>
<w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/>
<w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/>
<w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/>
<w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/>
<w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 6"/>
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-536870145 1107305727 0 0 415 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-536870145 1073786111 1 0 415 0;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-520092929 1073806591 9 0 415 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:0in;
line-height:107%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
mso-style-unhide:no;
mso-style-qformat:yes;
margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:.5in;
mso-add-space:auto;
line-height:107%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
{mso-style-priority:34;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-type:export-only;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
mso-add-space:auto;
line-height:107%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
{mso-style-priority:34;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-type:export-only;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
mso-add-space:auto;
line-height:107%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
{mso-style-priority:34;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-type:export-only;
margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:.5in;
mso-add-space:auto;
line-height:107%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.Namespace, li.Namespace, div.Namespace
{mso-style-name:Namespace;
mso-style-unhide:no;
mso-style-qformat:yes;
margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:1.0in;
line-height:107%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.Title-Mvc, li.Title-Mvc, div.Title-Mvc
{mso-style-name:Title-Mvc;
mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:Namespace;
margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:0in;
line-height:107%;
mso-pagination:widow-orphan;
font-size:14.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
font-weight:bold;
mso-bidi-font-weight:normal;}
p.SubTitle-MVC, li.SubTitle-MVC, div.SubTitle-MVC
{mso-style-name:SubTitle-MVC;
mso-style-unhide:no;
mso-style-qformat:yes;
margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:.5in;
line-height:107%;
mso-pagination:widow-orphan;
font-size:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
p.Note-Mvc, li.Note-Mvc, div.Note-Mvc
{mso-style-name:Note-Mvc;
mso-style-unhide:no;
mso-style-qformat:yes;
margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:0in;
line-height:107%;
mso-pagination:widow-orphan;
font-size:12.0pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
{mso-style-type:export-only;
margin-bottom:8.0pt;
line-height:107%;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:982581490;
mso-list-type:hybrid;
mso-list-template-ids:-513370762 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:8.0pt;
mso-para-margin-left:0in;
line-height:107%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US style='tab-interval:.5in'>
<div class=WordSection1>
<p class=MsoNormal>ASP.Net Empty template doesn't have any nuget packages
included, so no packages.json will exist.</p>
<p class=Title-Mvc>1. Installing MVC</p>
<p class=SubTitle-MVC>Packages Icluded</p>
<p class=Namespace>Microsoft.AspNet.Mvc</p>
<p class=Namespace>Microsoft.AspNet.WebPages</p>
<p class=Namespace>Microsoft.AspNet.Razor</p>
<p class=Namespace>Microsoft.Web.Infrastructure<span style='mso-tab-count:1'> </span></p>
<p class=Namespace>References Installed</p>
<p class=Namespace>System.Web.WebPages.Razor</p>
<p class=Namespace>System.Web.WebPages.Deployment</p>
<p class=Namespace>System.Web.WebPages</p>
<p class=Namespace>System.Web.Razor</p>
<p class=Namespace>System.Web.Mvc</p>
<p class=Namespace>System.Web.Helpers</p>
<p class=Namespace>Microsoft.Web.Infrastruture</p>
<p class=Title-Mvc>2. Uninstall-package - References Removed</p>
<p class=SubTitle-MVC>Microsoft.AspNet.Mvc</p>
<p class=Namespace>System.Web.Mvc</p>
<p class=SubTitle-MVC>Microsoft.AspNet.WebPages</p>
<p class=Namespace>System.Web.WebPages.Deployment</p>
<p class=Namespace>System.Web.WebPages</p>
<p class=Namespace>System.Web.Helpers</p>
<p class=SubTitle-MVC>Microsoft.AspNet.Razor</p>
<p class=Namespace>System.Web.Razor</p>
<p class=SubTitle-MVC>Microsoft.Web.Infrastructure</p>
<p class=Namespace>Microsoft.Web.Infrastruture</p>
<p class=Note-Mvc><b style='mso-bidi-font-weight:normal'>Finial complete MVC
directory structure:<o:p></o:p></b></p>
<p class=Namespace style='margin-left:0in'><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shapetype
id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="Picture_x0020_1" o:spid="_x0000_i1026" type="#_x0000_t75"
style='width:210pt;height:270.75pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="MVC1_files/image001.png" o:title=""/>
</v:shape><![endif]--><a href="https://4.bp.blogspot.com/-PHpnT4PdS1A/V-2NQjUbRVI/AAAAAAAAK7w/NFPx7h_ABuw4-4gDC6os_pR-LwRAoFrrACLcB/s1600/dir.png" imageanchor="1"><img border="0" src="https://4.bp.blogspot.com/-PHpnT4PdS1A/V-2NQjUbRVI/AAAAAAAAK7w/NFPx7h_ABuw4-4gDC6os_pR-LwRAoFrrACLcB/s400/dir.png" width="310" height="400" /></a></span></p>
<p class=Title-Mvc>3. Add Global Application Class File to application</p>
<p class=SubTitle-MVC>Global.asax.cs</p>
<p class=Note-Mvc>Project right click <b style='mso-bidi-font-weight:normal'>></b>
Add <b style='mso-bidi-font-weight:normal'>></b> New Item… <b
style='mso-bidi-font-weight:normal'>></b> Select Global Application Class</p>
<p class=Title-Mvc>4. Create folders</p>
<p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;mso-list:l0 level1 lfo1'><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>
</span></span></span>App_Start (can named anything)</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in;mso-list:l0 level1 lfo1'><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>
</span></span></span>Controllers</p>
<p class=MsoListParagraphCxSpLast style='text-indent:-.25in;mso-list:l0 level1 lfo1'><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>
</span></span></span>Views</p>
<p class=Title-Mvc>5. Under App_Start create a class file and name it whatever
you want - <span style='color:#9CC2E5;mso-themecolor:accent1;mso-themetint:
153'>RouteConfiguration</span>. </p>
<p class=Note-Mvc>.axd file types are HTTP Handlers, which should be ignored.</p>
<p class=Note-Mvc>Add code to file:</p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Collections.Generic;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Linq;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Web;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Web.Mvc;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Web.Routing;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>namespace</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> myWebsite.App_Start<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>{<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'>public</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>static</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>class</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:#2B91AF;background:white;mso-highlight:white'>RouteConfiguration</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>{<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'>public</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>static</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>void</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> Register(</span><span style='font-size:9.5pt;font-family:
Consolas;color:#2B91AF;background:white;mso-highlight:white'>RouteCollection</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> routes)<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>{<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>routes.IgnoreRoute(</span><span
style='font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;
mso-highlight:white'>"{resource}.axd/{*pathinfo}"</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>);<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>routes.MapRoute(<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>"Default"</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>,<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>"{controller}/{action}/{id}"</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>,<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>new</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> { controller = </span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>"Home"</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>, action = </span><span style='font-size:9.5pt;font-family:
Consolas;color:#A31515;background:white;mso-highlight:white'>"Index"</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>}<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>);<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>}<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>}<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.5pt;line-height:107%;font-family:
Consolas;color:black;background:white;mso-highlight:white'>}</span><span
style='font-size:9.5pt;line-height:107%;font-family:Consolas;color:black'><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.5pt;line-height:107%;font-family:
Consolas;color:black'><o:p> </o:p></span></p>
<p class=Title-Mvc>6. Add code to Global.asax class file passing all routes.</p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> com.waggintails.App_Start;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Collections.Generic;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Linq;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Web;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Web.Routing;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Web.Security;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Web.SessionState;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>namespace</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> com.waggintails<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>{<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'>public</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>class</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:#2B91AF;background:white;mso-highlight:white'>Global</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> : System.Web.</span><span style='font-size:9.5pt;
font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white'>HttpApplication</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>{<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'>protected</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>void</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> Application_Start(</span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'>object</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> sender, </span><span style='font-size:9.5pt;font-family:
Consolas;color:#2B91AF;background:white;mso-highlight:white'>EventArgs</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> e)<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>{<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white'>RouteConfiguration</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>.Register(</span><span style='font-size:9.5pt;font-family:
Consolas;color:#2B91AF;background:white;mso-highlight:white'>RouteTable</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>.Routes);<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>}<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>}<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.5pt;line-height:107%;font-family:
Consolas;color:black;background:white;mso-highlight:white'>}</span><span
style='font-size:9.5pt;line-height:107%;font-family:Consolas;color:black'><o:p></o:p></span></p>
<p class=Title-Mvc>7. Within controllers folder, add a MVC5 Controller - Empty</p>
<p class=Note-Mvc>Rename to whatever you like – <span style='color:#9CC2E5;
mso-themecolor:accent1;mso-themetint:153'>Home<o:p></o:p></span></p>
<p class=Note-Mvc>Add code to file:</p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Collections.Generic;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Linq;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Web;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>using</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> System.Web.Mvc;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'>namespace</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> com.waggintails.Controllers<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>{<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'>public</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>class</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:#2B91AF;background:white;mso-highlight:white'>HomeController</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> : </span><span style='font-size:9.5pt;font-family:Consolas;
color:#2B91AF;background:white;mso-highlight:white'>Controller</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>{<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:green;background:white;mso-highlight:white'>// GET:
Default</span><span style='font-size:9.5pt;font-family:Consolas;color:black;
background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'>public</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:#2B91AF;background:white;mso-highlight:white'>ActionResult</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> Index()<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>{<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'>return</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> View();<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>}<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>}<o:p></o:p></span></p>
<p class=Title-Mvc><span style='font-size:9.5pt;line-height:107%;font-family:
Consolas;color:black;background:white;mso-highlight:white'>}</span><span
style='font-size:9.5pt;line-height:107%;font-family:Consolas;color:black'><o:p></o:p></span></p>
<p class=Title-Mvc><o:p> </o:p></p>
<p class=Title-Mvc>8. Within views folder, add an empty view and name the view
as the same name that you had for the controller.</p>
<p class=Note-Mvc>Add code to file:</p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:yellow;mso-highlight:yellow'>@{</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>ViewBag.Title = </span><span
style='font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;
mso-highlight:white'>"Home"</span><span style='font-size:9.5pt;
font-family:Consolas;color:black;background:white;mso-highlight:white'>;<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:yellow;mso-highlight:yellow'>}</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>h2</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>Home</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'></</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>h2</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=Title-Mvc><o:p> </o:p></p>
<p class=Title-Mvc>And within Views folder, add a web.config file.</p>
<p class=Note-Mvc>Add code to file:</p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><?</span><span
style='font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;
mso-highlight:white'>xml</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'> </span><span
style='font-size:9.5pt;font-family:Consolas;color:red;background:white;
mso-highlight:white'>version</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>=</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>1.0</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>?></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><</span><span
style='font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;
mso-highlight:white'>configuration</span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>configSections</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>sectionGroup</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>name</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>system.web.webPages.razor</span><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>type</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup,
System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35</span><span style='font-size:9.5pt;font-family:
Consolas;color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>section</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>name</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>host</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>type</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>System.Web.WebPages.Razor.Configuration.HostSection,
System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'> </span><span
style='font-size:9.5pt;font-family:Consolas;color:red;background:white;
mso-highlight:white'>requirePermission</span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'>=</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>false</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'> /></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>section</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>name</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>pages</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>type</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>System.Web.WebPages.Razor.Configuration.RazorPagesSection,
System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35</span><span style='font-size:9.5pt;font-family:
Consolas;color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>requirePermission</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>false</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> /></span><span style='font-size:9.5pt;font-family:
Consolas;color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></</span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>sectionGroup</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>configSections</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>system.web.webPages.razor</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>host</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>factoryType</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc,
Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'> /></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>pages</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>pageBaseType</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>System.Web.Mvc.WebViewPage</span><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>namespaces</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span
style='font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;
mso-highlight:white'>add</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'> </span><span
style='font-size:9.5pt;font-family:Consolas;color:red;background:white;
mso-highlight:white'>namespace</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>=</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>System.Web.Mvc</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'> /></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span
style='font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;
mso-highlight:white'>add</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'> </span><span
style='font-size:9.5pt;font-family:Consolas;color:red;background:white;
mso-highlight:white'>namespace</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>=</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>System.Web.Mvc.Ajax</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'> /></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span
style='font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;
mso-highlight:white'>add</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'> </span><span
style='font-size:9.5pt;font-family:Consolas;color:red;background:white;
mso-highlight:white'>namespace</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>=</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>System.Web.Mvc.Html</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'> /></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>add</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>namespace</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>System.Web.Routing</span><span style='font-size:9.5pt;
font-family:Consolas;color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> /></span><span style='font-size:9.5pt;font-family:
Consolas;color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span
style='font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;
mso-highlight:white'>add</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'> </span><span
style='font-size:9.5pt;font-family:Consolas;color:red;background:white;
mso-highlight:white'>namespace</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>=</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>com.waggintails</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'> /></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></</span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>namespaces</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></</span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>pages</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>system.web.webPages.razor</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>appSettings</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>add</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>key</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>webpages:Enabled</span><span style='font-size:9.5pt;
font-family:Consolas;color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>value</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>false</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> /></span><span style='font-size:9.5pt;font-family:
Consolas;color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>appSettings</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>system.webServer</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>handlers</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>remove</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>name</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>BlockViewHandler</span><span style='font-size:9.5pt;
font-family:Consolas;color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>/></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>add</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>name</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>BlockViewHandler</span><span style='font-size:9.5pt;
font-family:Consolas;color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>path</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>*</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>verb</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>*</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>preCondition</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>integratedMode</span><span style='font-size:9.5pt;
font-family:Consolas;color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>type</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>=</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'>"</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>System.Web.HttpNotFoundHandler</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'> /></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></</span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>handlers</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>system.webServer</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>system.web</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>compilation</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>assemblies</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span><</span><span
style='font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;
mso-highlight:white'>add</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'> </span><span
style='font-size:9.5pt;font-family:Consolas;color:red;background:white;
mso-highlight:white'>assembly</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>=</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'>System.Web.Mvc,
Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>"</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'> /></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></</span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>assemblies</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></</span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>compilation</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></</span><span style='font-size:9.5pt;
font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>system.web</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>></span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'><o:p></o:p></span></p>
<p class=Title-Mvc><span style='font-size:9.5pt;line-height:107%;font-family:
Consolas;color:blue;background:white;mso-highlight:white'></</span><span
style='font-size:9.5pt;line-height:107%;font-family:Consolas;color:#A31515;
background:white;mso-highlight:white'>configuration</span><span
style='font-size:9.5pt;line-height:107%;font-family:Consolas;color:blue;
background:white;mso-highlight:white'>></span></p>
<p class=Note-Mvc>Press F5 and Home view should show correctly</p>
<p class=Title-Mvc>9. <Optional> Include a layout view</p>
<p class=SubTitle-MVC>Within the Views directory add a view called</p>
<p class=Namespace>_ViewStart.cshtml</p>
<p class=MsoNormal>This view allow you to specify the path for the layout view.</p>
<p class=Note-Mvc>Add code:</p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:yellow;mso-highlight:yellow'>@{</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>Layout = </span><span style='font-size:
9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white'>"~/Views/Shared/_Layout.cshtml"</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>;<o:p></o:p></span></p>
<p class=Note-Mvc><span style='font-size:9.5pt;line-height:107%;font-family:
Consolas;color:black;background:yellow;mso-highlight:yellow'>}</span><span
style='font-size:9.5pt;line-height:107%;font-family:Consolas;color:black'><o:p></o:p></span></p>
<p class=Note-Mvc>Within the directory you had specified in _ViewStart, add the
specified view - <span style='font-size:9.5pt;line-height:107%;font-family:
Consolas;color:#A31515;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span>_Layout.cshtml</span></p>
<p class=Note-Mvc>Add code – when using layouts, must include <b
style='mso-bidi-font-weight:normal'><span style='background:yellow;mso-highlight:
yellow'>@</span>RenderBody</b>.</p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>!DOCTYPE</span><span style='font-size:9.5pt;font-family:
Consolas;color:black;background:white;mso-highlight:white'> </span><span
style='font-size:9.5pt;font-family:Consolas;color:red;background:white;
mso-highlight:white'>html</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>html</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>head</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'><</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>meta</span><span style='font-size:9.5pt;font-family:Consolas;
color:black;background:white;mso-highlight:white'> </span><span
style='font-size:9.5pt;font-family:Consolas;color:red;background:white;
mso-highlight:white'>name</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>="viewport"</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:red;background:white;mso-highlight:white'>content</span><span
style='font-size:9.5pt;font-family:Consolas;color:blue;background:white;
mso-highlight:white'>="width=device-width"</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'> </span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>/></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'><</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>title</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>_Layout</span><span style='font-size:9.5pt;font-family:
Consolas;color:blue;background:white;mso-highlight:white'></</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>title</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'></</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>head</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'><</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>body</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'><</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>div</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:black;background:yellow;mso-highlight:yellow'>@</span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'>RenderBody() <o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'><span
style='mso-spacerun:yes'> </span></span><span style='font-size:9.5pt;
font-family:Consolas;color:blue;background:white;mso-highlight:white'></</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>div</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white'></</span><span
style='font-size:9.5pt;font-family:Consolas;color:maroon;background:white;
mso-highlight:white'>body</span><span style='font-size:9.5pt;font-family:Consolas;
color:blue;background:white;mso-highlight:white'>></span><span
style='font-size:9.5pt;font-family:Consolas;color:black;background:white;
mso-highlight:white'><o:p></o:p></span></p>
<p class=Note-Mvc><span style='font-size:9.5pt;line-height:107%;font-family:
Consolas;color:blue;background:white;mso-highlight:white'></</span><span
style='font-size:9.5pt;line-height:107%;font-family:Consolas;color:maroon;
background:white;mso-highlight:white'>html</span><span style='font-size:9.5pt;
line-height:107%;font-family:Consolas;color:blue;background:white;mso-highlight:
white'>></span><span style='font-size:9.5pt;line-height:107%;font-family:
Consolas;color:blue'><o:p></o:p></span></p>
<p class=Note-Mvc><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape
id="Picture_x0020_2" o:spid="_x0000_i1025" type="#_x0000_t75" style='width:226.5pt;
height:314.25pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="MVC1_files/image002.png" o:title=""/>
</v:shape><![endif]--><a href="https://2.bp.blogspot.com/-he2-kauvfHs/V-2Ni6TNwiI/AAAAAAAAK70/SWa-Puk31scmYaJ37VVMDHOItM3hLoq3wCLcB/s1600/dir1.png" imageanchor="1"><img border="0" src="https://2.bp.blogspot.com/-he2-kauvfHs/V-2Ni6TNwiI/AAAAAAAAK70/SWa-Puk31scmYaJ37VVMDHOItM3hLoq3wCLcB/s400/dir1.png" width="288" height="400" /></a></span><b
style='mso-bidi-font-weight:normal'><o:p></o:p></b></p>
<p class=Note-Mvc><b style='mso-bidi-font-weight:normal'>With layout, finial
complete MVC directory structure:</b></p>
</div>
<br />
<strong>
<span style="font-family: "georgia" , "times new roman" , serif;">
<br />
</span>
</strong>
<br />
<strong>
<span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span><br />
</strong>
<br />
<blockquote class="tr_bq">
<strong><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.” </span></strong>
</blockquote>
<strong>
<strong><em><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></em></strong><br />
</strong>
</body>
</html>
nomadicdoghttp://www.blogger.com/profile/09448616980321976085noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-70832207640786972622016-09-01T14:37:00.000-07:002016-09-01T14:39:22.407-07:00Razor Views Predefined Path ViewSetting predefined paths where the Razor View Engine locates partial views.<br />
<br />
<a href="https://www.simple-talk.com/dotnet/asp-net/a-look-at-the-razor-view-engine-in-asp-net-mvc/" target="_blank">A Look at the Razor View Engine in ASP.NET MVC</a><br />
<br />
Create a class:<br />
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
public class PredefinedPathViewEngine : RazorViewEngine
{
public PredefinedPathViewEngine()
{
var locationFormat = new[]
{
"~/Views/{1}/{0}.cshtml",
"~/Views/{1}/Partials/{0}.cshtml",
"~/Views/Shared/{0}.cshtml",
"~/Views/Shared/Partials/{0}.cshtml",
};
PartialViewLocationFormats = locationFormat.ToArray();
}
}
</code>
</pre>
</div>
<br />
Register the class within Global.asax.cs Application_Start() method:<br />
<br />
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
protected void Application_Start()
{
ViewEngines.Engines.Add(new PredefinedPathViewEngine());
}
</code>
</pre>
</div>
<br />
<strong><span style="font-family: "georgia" , "times new roman" , serif;"><br />
</span></strong><br />
<strong><span style="font-family: "georgia" , "times new roman" , serif;">This post is for the purpose of my notes only and sometimes a rant.</span><br />
</strong><br />
<blockquote class="tr_bq">
<strong><span style="font-family: "georgia" , "times new roman" , serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.” </span></strong></blockquote>
<strong><strong><em><span style="font-family: "georgia" , "times new roman" , serif;">Henry Ford</span></em></strong><br />
</strong>Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-79585548663836366442015-01-23T14:12:00.003-08:002016-07-18T08:59:07.222-07:00Handling JavaScript Dependencies and ASP.Net MVC FrameworkIn functional or component base programming, tracking dependencies is important.<br />
<br />
Methods handling dependency tracking can be handled client side, however, I was using ASP.Net MVC bundling and I wanted server side to handle the JavaScript dependency tracking.<br />
<br />
ASP.Net MVC bundling allows extensible points, where I wrote a class with a method that traced a specified directory and included the dependent files into a bundle.<br />
<br />
I was using JScript IntelliSense the “Reference” Tag at the top of the JavaScript files, which “if the “path” attribute points to another JS file, any objects or functions defined inside that file-or in a file referenced by that file-will show up in IntelliSense.” <br />
<br />
Code below, using the reference tags, I was able to trace dependencies.<br />
<br />
I created a class called BundleDependencies and created a reference to this class when registering bundles.<br />
<br />
<blockquote class="tr_bq">
var bundleDependencies = new BundleDependencies();</blockquote>
<br />
and calling referencePath method, which returns an array of dependent file names.<br />
<br />
This method accepts a relative path off the root to the directory. The files located in the specified directory will be root parent files. The root parent files will not be included in the bundle.<br />
<br />
The root parent file is the file that contains the reference. Only reference files will be included in the bundle and not the root parent file. Referenced files that have reference to another file isn't considered a parent file. There can only be one parent file, so all files with a reference will be traversed.<br />
<br />
JavaScript file can contain more than one reference:<br />
<blockquote class="tr_bq">
/// <reference path="Components/DropBox.js" /><br />
<br />
/// <reference path="Components/PageTitle.js" /><br />
<br />
/// <reference path="Components/RosterList.js" /></blockquote>
and reference a file located in another directory. Must be relative and strictly follow ../ notation:<br />
<blockquote class="tr_bq">
/// <reference path="../../Application/Model.js" /></blockquote>
Since Visual Studio supports Reference tags, all is need is drag JavaScript file from Solution Explorer and drop on the working JavaScript file.<br />
<br />
<strong></strong><br />
<strong>Bundle Configuration Class</strong><br />
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
namespace com.hillHigh1980
{
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
var bundleDependencies = new BundleDependencies();
// Script Bundles ================================
var scriptBundle = new ScriptBundle("~/bundles/Views/Home");
scriptBundle.Include(bundleDependencies.referencePath("Scripts/Views/Home/Components"));
scriptBundle.IncludeDirectory("~/Scripts/Views/Home", "*.js", true);
scriptBundle.Orderer = new NonOrderingBundleOrderer();
bundles.Add(scriptBundle);
}
}
}</code>
</pre>
</div>
<br />
<strong><br /></strong><br />
<strong>BundleDependencies Class</strong><br />
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web;
namespace com.hillHigh1980.Models
{
public class BundleDependencies
{
List<string><string> fileDependencies(string directory, string file, string scriptPath)
{
var regularExpression = new Regex(@"^///\s?<reference path="(.+)">$", RegexOptions.IgnoreCase);
Match match;
List<string><string> reference;
string relativePath;
List<string><string> directoryParts;
int countRelativePaths;
int countFolders;
var references = new List<string>();
Func<string,bool><string bool=""> parents = delegate(string parent) { return parent == ".."; };
var rows = File.ReadAllLines(file);
foreach (var row in rows)
{
match = regularExpression.Match(row);
if (match.Success)
{
//Parse reference row
reference = new List<string>(match.Groups[1].Value.Split('"')[1].Split('/'));
countRelativePaths = reference.Count(parents);
reference.RemoveRange(0, countRelativePaths);
//Parse directory
directoryParts = directory.Split('\\').ToList();
countFolders = directoryParts.Count() - 1;
//Create path where reference is located.
directoryParts.RemoveRange(countFolders - countRelativePaths + 1, countRelativePaths);
directoryParts.AddRange(reference);
//Complete path to reference file.
file = string.Join(@"\", directoryParts.ToArray());
//Create relative path, which will be added to bundle.
relativePath = "~/" + file.Substring(file.IndexOf(scriptPath)).Replace(@"\", "/");
//Creating directory path, don't need file.
directoryParts.RemoveAt(directoryParts.Count() - 1);
directory = string.Join(@"\", directoryParts.ToArray());
//Specified refernce may contain additional references.
references.AddRange(fileDependencies(directory, file, scriptPath));
references.Add(relativePath);
}
else
{
//Limit to the first line. All done if not found.
break;
}
}
return references;
}
//Locates all files within a specified directory.
//All sub-directories are searched if includeSubDirectories is set true.
public string[] referencePath(string viewPath, bool includeSubDirectories = false, string scriptPath = "Scripts")
{
var references = new List<string>();
List<string><string> result;
string[] directories;
if (includeSubDirectories)
{
directories = Directory.GetDirectories(HttpContext.Current.Server.MapPath(viewPath));
}
else
{
directories = new[] {HttpContext.Current.Server.MapPath(viewPath)};
}
foreach (var directory in directories)
{
foreach (var file in Directory.GetFiles(directory))
{
result = fileDependencies(directory, file, scriptPath);
references.AddRange(result);
}
}
var responses = references.ToArray();
return responses;
}
}
}
}</string></string></string></string></string></string></string></reference></string></code>
</pre>
</div>
<b><br /></b><br />
<b>NonOrderingBundleOrderer Class</b>
<br />
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Optimization;
namespace com.hillHigh1980.Models
{
class JSFileTransformer : IBundleTransform
{
public void Process(BundleContext context, BundleResponse response)
{
}
}
class NonOrderingBundleOrderer : IBundleOrderer
{
public IEnumerable<bundlefile> OrderFiles(BundleContext context, IEnumerable<bundlefile> files)
{
var count = files.Count();
var arry = files.ToArray();
var j = 1;
BundleFile hold = arry[0];
BundleFile temp;
for (int i = 0; i < count; i++)
{
if (hold.VirtualFile.Name.IndexOf("_View") == -1)
{
if (j < count)
{
temp = arry[j];
arry[j] = hold;
hold = temp;
j += 1;
}
}
else
{
arry[0] = hold;
break;
}
}
return arry;
}
}
}
</bundlefile></bundlefile></code>
</pre>
</div>
Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-1216683652105127682014-10-26T10:44:00.001-07:002014-10-26T10:44:34.862-07:00Web API Message Lifecycle<a href="http://www.asp.net/posters/web-api/asp.net-web-api-poster.pdf" target="_blank">Web API Message Lifecycle</a><br />
<br />
<br />
<a href="http://msdn.microsoft.com/en-us/library/hh833994(v=vs.108).aspx" target="_blank">ASP.NET Web API</a><br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3gU7J7eyRbTwnM_GawwHdY5jvlQsyWRVoZe68ZDF4AF_1wiy2OYIAGK2m0LbBdd6IfvVPJPsewriXU94eAW_BQwoCIm0aem5E2BZV_3o-P15Ll_iX6kjpzADJ96CX4ajWFZptgFBuveNP/s1600/asp.net-web-api-poster.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3gU7J7eyRbTwnM_GawwHdY5jvlQsyWRVoZe68ZDF4AF_1wiy2OYIAGK2m0LbBdd6IfvVPJPsewriXU94eAW_BQwoCIm0aem5E2BZV_3o-P15Ll_iX6kjpzADJ96CX4ajWFZptgFBuveNP/s1600/asp.net-web-api-poster.jpg" height="640" width="494" /></a></div>
<br /><br />
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-3101330817567399742014-09-20T00:10:00.000-07:002014-09-20T00:18:33.347-07:00With a new thought, revisited previous post: <a href="http://idedogs.blogspot.com/2014/06/chained-javascript-inheritance.html" target="_blank">JavaScript Chained Inheritance</a><br />
Included ability to inherit from either an Object or a Constructor function
<br />
<h4>
New Idea
</h4>
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
hillHigh.inherit = function (subClass) {
return new function () {
var superClasses = [subClass],
result,
convertToContructorFunctions = function () {
for (var i = 0, length = superClasses.length; i < length; i++) {
if (Object.prototype.toString.call(superClasses[i]) === "[object Object]") {
console.log(i);
superClasses[i] = superClasses[i].constructor;
}
}
};
this.from = function (superClass) {
superClasses.push(superClass);
return this;
};
this.provide = function () {
convertToContructorFunctions();
for (var i = superClasses.length - 1; i > 0; i -= 1) {
superClasses[i - 1].prototype = new superClasses[i]();
superClasses[i - 1].prototype.constructor = superClasses[i - 1];
}
return superClasses[0];
};
return this;
};
};
</code>
</pre>
</div>
<h4>
Results
</h4>
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
var Fn1 = function () {
this.a = "a";
};
var Fn2 = function () {
this.b = "b";
};
var Fn3 = function () {
this.c = "c";
};
var fn1 = new Fn1();
var fn2 = new Fn2();
var fn3 = new Fn3();
//All Constructor functions
var result0 = hillHigh.inherit(fn3).from(fn2).from(fn1).provide();
//All Objects
var result1 = hillHigh.inherit(Fn3).from(Fn2).from(Fn1).provide();
//Mix Objects and constructor functions
var result2 = hillHigh.inherit(fn3).from(Fn2).from(fn1).provide();
console.log("result0: " + result0.a);
console.log("result0: " + result0.b);
console.log("result0: " + result0.c);
console.log("result1: " + result1.a);
console.log("result1: " + result1.b);
console.log("result1: " + result1.c);
console.log("result2: " + result2.a);
console.log("result2: " + result2.b);
console.log("result2: " + result2.c);
</code>
</pre>
</div>
<div style="margin-top: 24px;">
<strong><span style="font-family: Georgia, "Times New Roman", serif;">This post is for the purpose of my notes only and sometimes a rant.</span></strong><br />
<blockquote class="tr_bq">
<span style="font-family: Georgia, "Times New Roman", serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.” </span></blockquote>
<strong><em><span style="font-family: Georgia, "Times New Roman", serif;">Henry Ford</span></em></strong>
</div>
Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-86511793778968716402014-06-07T13:19:00.001-07:002014-06-07T13:19:05.693-07:00Chained JavaScript Inheritance.<div style="font-family: Georgia, "Times New Roman", serif;">
Chained JavaScript Inheritance. Thought this may be useful.<br />
<br />
Define Objects:
<br />
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
var Fn1 = function () {
this.a = "a";
};
var Fn2 = function () {
this.b = "b";
}
var Fn3 = function () {
this.c = "c";
}
</code>
</pre>
</div>
Inheritance<br />
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
inherit(Fn3).from(Fn2).from(Fn1).provide();
</code>
</pre>
</div>
Extend<br />
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
Fn1.prototype.aa = function () {
return "AA";
};
Fn2.prototype.bb = function () {
return "BB";
};
Fn3.prototype.cc = function () {
return "CC";
};
</code>
</pre>
</div>
Instantiate<br />
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
var ff = new Fn3();
</code>
</pre>
</div>
Inherit Object
<br />
<div>
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-size-adjust: none; font-stretch: normal; font: 1.1em/normal "Courier New", Courier, Fixed;">
var inherit = function (subClass) {
return new function () {
var superClasses = [subClass],
result;
this.from = function (superClass) {
superClasses.push(superClass);
return this;
};
this.provide = function () {
for (var i = superClasses.length - 1; i > 0; i -= 1) {
superClasses[i-1].prototype = new superClasses[i]();
superClasses[i-1].prototype.constructor = superClasses[i-1];
}
return subClass;
};
return this;
};
};
</code>
</pre>
</div>
</div>
<strong><span style="font-family: Georgia, "Times New Roman", serif;">This post is for the purpose of my notes only and sometimes a rant.</span></strong><br />
<blockquote class="tr_bq">
<span style="font-family: Georgia, "Times New Roman", serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.” </span></blockquote>
<strong><em><span style="font-family: Georgia, "Times New Roman", serif;">Henry Ford</span></em></strong>Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-11223197403685906922014-06-02T14:20:00.001-07:002014-06-06T09:59:21.109-07:00AngularJS and MVC 4 Bundling Optimization<span style="font-family: Georgia, "Times New Roman", serif;">When bundling AngularJS controllers, MVC 4 optimization best optimizes by renaming variables. Shrinking of variables reduces file size, however, when incorporating AngularJS and creating a controller, the $scope variable can NOT be renamed.</span><br />
<span style="font-family: Georgia, "Times New Roman", serif;"></span><br />
<span style="font-family: Georgia, "Times New Roman", serif;">Not a big fan of third party scripts, yet the company that I was employed with, I had to find a work around. </span><br />
<span style="font-family: Georgia, "Times New Roman", serif;"></span><br />
<span style="font-family: Georgia, "Times New Roman", serif;">This is why I enjoy .Net MVC, because I’m not stuck with a deterministic framework. MS MVC offers many tools. Below is how I got Angular to be minified.</span><br />
<span style="font-family: Georgia, "Times New Roman", serif;">Create a new C# class (NoRenameTransform.cs) and extended the IBundleTransform interface.</span><br />
<span style="font-family: Georgia, "Times New Roman", serif;"></span><br />
<span style="font-family: Georgia, "Times New Roman", serif;">Include these namespaces:</span><br />
<a href="http://msdn.microsoft.com/en-us/library/system.web.optimization(v=vs.110).aspx"><span style="font-family: Georgia, "Times New Roman", serif;">System.Web.Optimization</span></a><br />
<span style="font-family: Georgia, "Times New Roman", serif;">Microsoft.Ajax.Utilities</span><br />
<hr />
<div style="margin: 12px;">
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-family: "Courier New", Courier, Fixed; font-size-adjust: none; font-size: 1.1em; font-stretch: normal;">
using System;
using Microsoft.Ajax.Utilities;
using System.Web;
using System.Web.Optimization;
</code>
</pre>
</div>
<span style="font-family: Georgia, "Times New Roman", serif;">And implement the IBundleTransform interface</span>
<br />
<div style="margin: 12px;">
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-family: "Courier New", Courier, Fixed; font-size-adjust: none; font-size: 1.1em; font-stretch: normal;">
public class NoRenameTransform : IBundleTransform
{
protected static Minifier compiler = new Minifier();
public void Process(BundleContext context, BundleResponse response)
{
var codeSettings = new CodeSettings
{
NoAutoRenameList = "$scope"
};
response.Content = compiler.MinifyJavaScript(response.Content, codeSettings);
}
}
</code>
</pre>
</div>
<span style="font-family: Georgia, "Times New Roman", serif;">The Micorsoft.Ajax.Utilities exposes the </span><a href="http://ajaxmin.codeplex.com/wikipage?title=AjaxMin%20DLL"><span style="font-family: Georgia, "Times New Roman", serif;">Minifier</span></a><span style="font-family: Georgia, "Times New Roman", serif;"> / </span><a href="http://www.asp.net/ajaxlibrary/AjaxMinDLL.ashx"><span style="font-family: Georgia, "Times New Roman", serif;">Minifer ASP.NET</span></a><span style="font-family: Georgia, "Times New Roman", serif;"> object, which has a MinifyJavascript method. MinifyJavaScript method optimizes the file’s contents.</span><br />
<span style="font-family: Georgia, "Times New Roman", serif;"></span><br />
<span style="font-family: Georgia, "Times New Roman", serif;">Micorsoft.Ajax.Utilities also exposes the CodeSettings object.</span><br />
<span style="font-family: Georgia, "Times New Roman", serif;"></span><br />
<span style="font-family: Georgia, "Times New Roman", serif;">Create a field instantiating Minifier object.</span><br />
<span style="font-family: Georgia, "Times New Roman", serif;"></span><br />
<span style="font-family: Georgia, "Times New Roman", serif;">Within the Process method, create a variable instantiating CodeSettings object. Set the NoAutoRenameList property to an array of strings of the item(s) that shouldn’t be changed. The $scope variable will not be minified.</span>
<br />
<div style="margin: 12px;">
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-family: "Courier New", Courier, Fixed; font-size-adjust: none; font-size: 1.1em; font-stretch: normal;">
var codeSettings = new CodeSettings
{
NoAutoRenameList = "$scope"
};
</code>
</pre>
</div>
<span style="font-family: Georgia, "Times New Roman", serif;">IBundleTransform contract expects a Process method, and the Process method arguments expose </span><a href="http://msdn.microsoft.com/en-us/library/system.web.optimization.bundlecontext(v=vs.110).aspx"><span style="font-family: Georgia, "Times New Roman", serif;">BundleContext</span></a><span style="font-family: Georgia, "Times New Roman", serif;"> and </span><a href="http://msdn.microsoft.com/en-us/library/system.web.optimization.bundleresponse(v=vs.110).aspx"><span style="font-family: Georgia, "Times New Roman", serif;">BundleResponse</span></a><span style="font-family: Georgia, "Times New Roman", serif;">.</span><br />
<hr />
<span style="font-family: Georgia, "Times New Roman", serif;">Within the registered bundle configuration file, instantiate a new ScriptBundle class. ScriptBundle inherits from the Bundle class.</span><br />
<span style="font-family: Georgia, "Times New Roman", serif;"></span><br />
<span style="font-family: Georgia, "Times New Roman", serif;">ScriptBundle exposes a Generic IList Transforms property.</span><br />
<span style="font-family: Georgia, "Times New Roman", serif;"></span><br />
<span style="font-family: Georgia, "Times New Roman", serif;">Clear Transform</span><br />
<span style="font-family: Georgia, "Times New Roman", serif;"></span><br />
<span style="font-family: Georgia, "Times New Roman", serif;">Add a new reference to the NoRenameTransform class.</span>
<br />
<div style="margin: 12px;">
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-family: "Courier New", Courier, Fixed; font-size-adjust: none; font-size: 1.1em; font-stretch: normal;">
var scriptBundleCore = new ScriptBundle"~/bundles/Modules/EventsApp");
scriptBundleCore.Include("~/Scripts/Modules/EventsApp/app.js");
scriptBundleCore.IncludeDirectory("~/Scripts/Modules/EventsApp/controllers", "*.js", true);
scriptBundleCore.Transforms.Clear();
scriptBundleCore.Transforms.Add(new NoRenameTransform());
bundles.Add(scriptBundleCore);
</code>
</pre>
</div>
<hr />
<span style="font-family: Georgia, "Times New Roman", serif;">Bundle lifecycle:
</span><br />
<span style="font-family: Georgia, "Times New Roman", serif;">Global.asax, Application_Start, Bundles are registered</span>
<br />
<div style="margin: 12px;">
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-family: "Courier New", Courier, Fixed; font-size-adjust: none; font-size: 1.1em; font-stretch: normal;">
BundlesConfig.RegisterBundles(BundleTable.Bundles);
</code>
</pre>
</div>
<span style="font-family: Georgia, "Times New Roman", serif;">BundlesConfig.RegisterBundles is called and ScriptBundle objects are added to the BundleTable.
</span><br />
<div>
<span style="font-family: Georgia, "Times New Roman", serif;">ScriptBundles exposes a default transform property, which can be cleared.</span></div>
<div style="margin: 12px;">
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-family: "Courier New", Courier, Fixed; font-size-adjust: none; font-size: 1.1em; font-stretch: normal;">
scriptBundleCore.Transforms.Clear();
</code>
</pre>
</div>
<span style="font-family: Georgia, "Times New Roman", serif;">Add new behavior with how the bundle should be minified.</span>
<br />
<div style="margin: 12px;">
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-family: "Courier New", Courier, Fixed; font-size-adjust: none; font-size: 1.1em; font-stretch: normal;">
scriptBundleCore.Transforms.Add(<span style="color: blue;">new</span> NoRenameTransform());</code></pre>
</div>
<span style="font-family: Georgia, "Times New Roman", serif;">The transform Process method is called from when the razor view is rendered.</span>
<br />
<div style="margin: 12px;">
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-family: "Courier New", Courier, Fixed; font-size-adjust: none; font-size: 1.1em; font-stretch: normal;">
@Scripts.Render("~/bundles/Modules/EventsApp")</code></pre>
</div>
<hr />
<span style="font-family: Georgia, "Times New Roman", serif; font-size: large;">Complete Code</span><br />
<span style="font-family: Georgia, "Times New Roman", serif;"></span><br />
<span style="font-family: Georgia, "Times New Roman", serif;"><strong>Razor View</strong></span><br />
<div style="margin: 12px;">
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-family: "Courier New", Courier, Fixed; font-size-adjust: none; font-size: 1.1em; font-stretch: normal;">
@{
ViewBag.Title = "Index";
}
<div ng-app class="container">
<div ng-controller="EventController">
{{name}}
</div>
</div>
@section scripts {
@Scripts.Render("~/bundles/Modules/EventsApp")
}
</code>
</pre>
</div>
<b><span style="font-family: Georgia, "Times New Roman", serif;">Config.asax</span></b>
<br />
<div style="margin: 12px;">
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-family: "Courier New", Courier, Fixed; font-size-adjust: none; font-size: 1.1em; font-stretch: normal;">
using FileUpload_MVC.App_Start;
using System;
using System.Collections.Generic;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace FileUpload_MVC
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundlesConfig.RegisterBundles(BundleTable.Bundles);
}
}
}
</code>
</pre>
</div>
<b><span style="font-family: Georgia, "Times New Roman", serif;">BundleConfig.cs</span></b>
<br />
<div style="margin: 12px;">
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-family: "Courier New", Courier, Fixed; font-size-adjust: none; font-size: 1.1em; font-stretch: normal;">
using FileUpload_MVC.Models;
using System.Web.Optimization;
namespace FileUpload_MVC.App_Start
{
public class BundlesConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Clear();
BundleTable.EnableOptimizations = true;
var scriptBundleCore = new ScriptBundle("~/bundles/Modules/EventsApp");
scriptBundleCore.Include("~/Scripts/Modules/EventsApp/app.js");
scriptBundleCore.IncludeDirectory("~/Scripts/Modules/EventsApp/controllers", "*.js", true);
scriptBundleCore.Transforms.Clear();
scriptBundleCore.Transforms.Add(new NoRenameTransform());
bundles.Add(scriptBundleCore);
}
}
}
</code>
</pre>
</div>
<b><span style="font-family: Georgia, "Times New Roman", serif;">NoRenameTransform.cs</span></b>
<br />
<div style="margin: 12px;">
<pre style="background: rgb(239, 239, 239); border-image: none; border: 1px solid rgb(166, 176, 191); color: black; overflow: auto; padding: 10px;"><code style="font-family: "Courier New", Courier, Fixed; font-size-adjust: none; font-size: 1.1em; font-stretch: normal;">
using System;
using Microsoft.Ajax.Utilities;
using System.Web;
using System.Web.Optimization;
namespace FileUpload_MVC.Models
{
public class NoRenameTransform : IBundleTransform
{
protected static Minifier compiler = new Minifier();
public void Process(BundleContext context, BundleResponse response)
{
context.UseServerCache = false;
response.Cacheability = HttpCacheability.NoCache;
var codeSettings = new CodeSettings
{
NoAutoRenameList = "$scope"
};
response.Content = compiler.MinifyJavaScript(response.Content, codeSettings);
}
}
}
</code>
</pre>
</div>
<strong><span style="font-family: Georgia, "Times New Roman", serif;">This post is for the purpose of my notes only and sometimes a rant.</span></strong><br />
<blockquote class="tr_bq">
<span style="font-family: Georgia, "Times New Roman", serif;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.” </span></blockquote>
<strong><em><span style="font-family: Georgia, "Times New Roman", serif;">Henry Ford</span></em></strong>Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com1tag:blogger.com,1999:blog-3128161234871658086.post-34758820086500365302014-05-17T23:05:00.001-07:002014-05-18T07:35:11.041-07:00Native JavaScript + JQuery vs AngularJS<br />
Both JavaScript and JQuery have been around and are performing better. <br />
<br />
Except JQuery, I haven’t accepted any other third party JavaScript frameworks or libraries. However recently, I have been drilling into AngularJS. I’m questioning, is Angular worth adding to projects?<br />
<br />
After reading, <a href="http://benfoster.io/blog/angularjs-recursive-templates">AngularJS recursive templates</a>, post, it appears Angular is bloated and expensive compared to native JavaScript.<br />
<br />
I rewrote the post’s conclusion in Native JavaScript + JQuery. What I wrote isn’t the best and can be improved on, however I believe it to be sleeker and trimmer.<br />
<br />
Conclusion, presently I wouldn’t include any Angular into projects. I would continue learning JavaScript and apply all the great JavaScript patterns.<br />
<br />
Please compare what I offered and mention why Angular? Please I know about reinventing the wheel, but I’m not convinced.<br />
<br />
View what they offered <a href="http://jsfiddle.net/dedogs/W4E3s/" target="_blank">JSFiddle</a>.<br />
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="300" src="http://jsfiddle.net/dedogs/W4E3s/embedded/" width="100%"></iframe>
<br />
<br />
Below is what I thought would accomplish similar results.<br />
<br />
<strong>DOM</strong><br />
<br />
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;"><</span><span style="color: maroon;">div</span> <span style="color: red;">id</span><span style="color: blue;">="ahhBetter"</span><span style="color: blue;">></span><span style="color: red;">&nbsp;</span><span style="color: blue;"></</span><span style="color: maroon;">div</span><span style="color: blue;">></span></pre>
</div>
<br />
<strong>JavaScript + JQuery</strong><br />
<br />
<div>
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;">function</span> doAgain(arry) {
<span style="color: blue;">var</span> s = <span style="color: #006080;">"<ul>"</span>;
<span style="color: blue;">for</span> (<span style="color: blue;">var</span> i = 0; i < arry.length; i++) {
s += <span style="color: #006080;">"<li>"</span> + arry[i].title + <span style="color: #006080;">"</li>"</span>;
<span style="color: blue;">if</span> (arry[i].categories) {
s += doAgain(arry[i].categories);
}
}
s += <span style="color: #006080;">"</ul>"</span>
<span style="color: blue;">return</span> s;
}
$(<span style="color: #006080;">"#ahhBetter"</span>).append(doAgain(items));</pre>
</div>
<br />
<div>
<strong>Data</strong></div>
<br />
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;">var</span> items = [{
title: <span style="color: #006080;">'Computers'</span>,
categories: [{
title: <span style="color: #006080;">'Laptops'</span>,
categories: [{
title: <span style="color: #006080;">'Ultrabooks'</span>
}, {
title: <span style="color: #006080;">'Macbooks'</span>
}]
},
{
title: <span style="color: #006080;">'Desktops'</span>
},
{
title: <span style="color: #006080;">'Tablets'</span>,
categories: [{
title: <span style="color: #006080;">'Apple'</span>
}, {
title: <span style="color: #006080;">'Android'</span>
}]
}
]
},
{
title: <span style="color: #006080;">'Printers'</span>
}
];</pre>
</div>
<br />
<br />
<strong>This post is for the purpose of my notes only and sometimes a rant.</strong> <br />
<blockquote class="tr_bq">
<em><span style="font-size: large;">“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”</span></em> </blockquote>
<blockquote class="tr_bq">
<span style="font-size: large;"><strong><em>Henry Ford</em></strong></span></blockquote>
Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-41935538880374050602014-05-09T17:51:00.001-07:002014-05-09T17:55:08.226-07:00Azure: Transferring Local SQL Database to Azure SQL Database<p> </p> <p><strong>Setup a SQL Server at Azure.</strong></p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9wMSY2vABcbOXNmroQ0HKBH9_47XyAKX6IdBxFDHjhP7z_Qn2uDgY8xCs_1N1xD_S353EOykI2zBmnfuKlKj0WwG0QZpMFmVjkuWKUCY4FP1R6nCRPDkSPoKGg_lc_rB0p_mYJIM_5uHm/s1600-h/image%25255B19%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4JqgHzLdoz9PjdpothAUOqASPF0ZdnJ5JpVx0Eg2Y7LC8moJM4drVrSvXNr8quVK0laRUlmix8dzzdnfH9EE3ZD9QJWu-GjCfPomWzurSHbJINSLlWUpTjJ47zVxRLj-UmWLSC4me7TFX/?imgmax=800" width="506" height="228"></a></p> <p>Click <strong>Create A SQL Database Server, and fill in server settings:</strong></p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXt8IJO3zWx1_ie0f0F5EsQdkEMiavQfs4cAenkNeZfstYraNd8ZJK-bFnNJaBaD-KI3Y8FRhNsz1w7kFSsL4aLF7i_vaMQzYGoZUzaNureVVkX3o4g_9GM66vhoLhjhheB6AZHFhFlhqH/s1600-h/image%25255B23%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-157gtgGJqMBHZ7rEzGzqMp5MsR21FVDuJtMvOfyJ03OQTzoWYRnpVoXDlzDfs-he23a-W-2QB7mvCaz1qIuKtDosecybUl8qgiEndTm2HpGkM0gjy_MnZvyTOObcui14qnyn-tSv4tQS/?imgmax=800" width="420" height="471"></a></p> <p>Clicking on the check mark, SQL server is created and display. The server name is <strong>123456785.</strong></p> <hr> <p>Locally, I have SQL Server 2012, which has two databases. I will be transferring these databases to Azure.</p> <ul> <li>FileUploadSQLDB</li> <li>GoonSeedsSQL</li></ul> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihE_formMIbQNZyLW_vcVCAXjmt_4QhWWzyh0ijvXCd9joCgj8uPnw1Mh2TksECqUSlJ7bPByfL8m5OMefHP8UaJLGDJCcuYixvO-M5R7SUkQXfSO1k270s-iZPDVvuwob3Nkw7fbjRvkt/s1600-h/image%25255B11%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLRWfBEGOcImBSHZXAP83FknXt4R5EPgRCj0AOFtuSP6nKJxBDXR1Ku1VfLGAWdQ1KLZddXvOj65IAubFWjrJHqyiduTsAbbpsj9SqhM2qoQVlOLDdB94kgP7U2qyPj1-QLtL2jd_Ac8-v/?imgmax=800" width="256" height="382"></a></p> <p><strong>Right click on database >Tasks > Deploy Database to SQL Azure</strong></p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigbjoWVGvUEUQ2K5Ypho5rhEsCb-oe2IicgW5410TQGq0pn2iAnUlMf2p0FiiNa7_qRUYmnt4VCOjLt1NvkyMSAo1U4KcJijphR9ow0OfCqJfmRwpSKyDCZuWai9op4XxtTfIa52aWKYMD/s1600-h/image%25255B15%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsQ9GcXl0zcxVvGHdKrLqebP-nZktSFXvUgVbW1qVVznAkYsNUFDvMtA69TTQLF8cSdP97UmmXCo5ag8J4YhLjbRsJv4Xq99bvp7NolMGQF6BBnnODivr1adixDZ5l9C6OliMrijQlhdgT/?imgmax=800" width="383" height="437"></a></p> <p><strong>Click next ></strong></p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ6tcjOwEYK1VnQNs6TrPduxcDLqo1vkg_H8S7tlIWcMHqdIgCOPULLs9xMfFUt16hzWJlDJI74nXBZWmqcNwA0sLPM_QJplSqAGPbujcr1WVmUQRn9wZ6fWS6Edfd0K0Y-0mRTg2GAhKn/s1600-h/image%25255B31%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6ehCOk2MBHq6QeNgUH1ydb3EOcBZutQZs7kWsdIcnjG9scNbwrQ6_vtUUSGDnp0_5gGNg_rQHtcnEAQvfV5VNkPLgOYBTdVgAKiaQigs2fmsikcNdI8SHLHUIRBglFGgOeeXKmQn8C9MC/?imgmax=800" width="452" height="418"></a></p> <p><strong>Click Connect ></strong></p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji4FBoTa9zirCAgXn9nMKlql12IRH_Gz8uPig2EVeThKTinD32_As0DTyRBq505lyNTTcP2a7IqiYO1PBvHsAruj2TmR-eq7nnuWyiCS9owLTF6Wf_PZNxqoM0aBnb3cP2Ae80WS42YkRL/s1600-h/image%25255B35%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6HJZ3LS15lWszgi8nHH4RhGqVEN4TydlGB9uhZ-O8CY3uFLh_mXGK7i-UjjWwVNUuoRoucwiZsQuCZhd_GKMd-nGMKxtOtnHe1rvoJmlhWU6zLotwt8sYikXSryQ2V_ygk3YFdz3DtMHD/?imgmax=800" width="452" height="424"></a></p> <p>Enter the Server name (123456785), Login and Password <font color="#ff0000">(Should receive an error)</font>:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikN5xIH-pgPctRAgfzq4DftZEuQGl_ISfK5B-qAwqqL7PiFyTqJja5klrS-aoGGYUH2qeEY6G_BC0v_uHYGvE5dElJ4PotgozVgUZrZipGOGZbYr241h-ZVCwYiKd9YkCcGsxNgqGq-5xv/s1600-h/image%25255B43%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzPyFMMM-yyFRh-xlsqqDqTKPhrtsAwODxDVR2p5NQjCDvcrWvvnfX8BAKO9n9Zqgjbg-wieB0p9FDFEe2qPtVV7uLuGpz0Rxg4UPUAmFmAT14aU71PaD5G2as_goedeWJOpOqlBw9C1vk/?imgmax=800" width="484" height="394"></a></p> <p><font color="#ff0000">Should receive an error, </font><font color="#000000">this occurs because Azure’s firewall. Correct the problem, go back to Azure.</font></p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-mXk825Ez15hGO3MY3EzZBdCc6c5-A8WoyIGl712TBXuOumPThC0qTRddq7ZSgj1UJu2sE9jMXdrFy2YUAMagSfPrg9aqS_d8e0eXzT7teH1k_u1Ki5PwbyPP1jt7FJgglRoaLKEI0FxV/s1600-h/image%25255B47%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc8nu4i1SlYraRe2o84PxQJWdsfOEwKBNpjpGvNKEiTReDCJnDodntJ7gGmsoH_GdcVEBrAT7lK7yeWcaudw6yy5GmFtboQBJBWLDGrh2ognLlrUV4rJUH5Z-vMPH1oOZ3QD-Wu-viZWZ4/?imgmax=800" width="503" height="262"></a></p> <p><font color="#333333"></font> </p> <p>Click on Manage:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLySmW1cyZTXpt4w25rm_Hs79osIsknJTEhlzzNUJmr3VPDcFdqxJ6NbndSOFhPE1_EgtS1SAFF_lVplSFEJApr7QAw2-tZmh2qd5iD07ib0bH-DdEVx6_3v_G3mvww3U_Pfdi24m9JqZg/s1600-h/image%25255B55%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ__Omsc87WxOGDYtjenwOnKgVGyHgDCyaNixiMxv4LFcIgdh9hYWCN69xXQxlF7tl0wjFJ8JYptzYSCsGG_Hm1PCqrRg5HvPYN2pIUVj1zmz04zGlvQeiN6uQpkn_7Ns1MIrBw6kuY6CL/?imgmax=800" width="529" height="361"></a></p> <p>Will receive two messages, Clicking yes will include the Server address to the firewall rules:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi62DxH7KmsoxoBNINGDnuykAMjQkNmI5GFzB2C5W-SunJd4wBXDRN3qnL1q6FCrNIsBeK4ND1I0-xJdZjOYrodcGmRRT77WCUM000htZTOe1s51RMmHBFiDjoi3nmkr3h5sHGuEQ74UPBh/s1600-h/image%25255B59%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0lT6B81vdWrbGIArsbdHCohFBLZjx2tKLdGNNvcs19B3Eg_ybRB9znguXiNOqZfwVyZlVMAoqsL4arAP714Yz4XayDzTEFe1mqwf36-RUFO3IXMEvh70TxA-oCugQ2SJqWlZDyBhoHEya/?imgmax=800" width="554" height="132"></a></p> <p>When click yes, will be prompted with another message, and click yes. This should correct the local database error.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL8Nx9KTJ1GVQwAthK0TGC_COWK55Jj3zkzjAjV49Pip1YtoP_l9JkNGViJi1dp9fDxYxOM3Cl1QgqGXV-7fap8OkD3-xVDQBAgeHO3_r4O5PLz-BblYUEeuN4b9Ln7hKuV80qLf4jN2eQ/s1600-h/image%25255B63%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgczfLMXZ3tEi5Q4ldbgX9Zo2H1faJYhHOhpbBkhK5-V18KzuVVvanNfrvsScS-xs0GBDCXANzk7XpmOGWZGbEoNDTPI2kOQbg5e2EHKGeB_HYyRRckQx6IVNJ0wbVEoxgrYR78bRRq5gBb/?imgmax=800" width="561" height="129"></a></p> <p>Return to SQL Server Management Studio. <strong>Click Connect ></strong></p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl69SjKn38qRrFsfH_mPgTz42jmaq6F3yszwbtopil4v3y3PwmGHgkCoh2gh2nvqTinrUV9fC1JFxHLe4qoSHqrdt0AR7eBnhMNpuY7MARABsxk2oA27V4sDKr9GmQyfUX9n64junM4xpF/s1600-h/image%25255B67%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6npn7CLrq4UKH8aVNx3OllB7COAgfhubusUpK4gyli05DK5DDVUVJrHSEPwkuEPij8P_q6qGbR4TlS18xn2s89t8FlXKj_y6xnF9UriL9EPt1rFGMFnBzwx_mjfTRdL1-MgzbGO3F9T9Y/?imgmax=800" width="484" height="394"></a></p> <p><strong>Click Next ></strong></p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbyDYumfpYDRbAVv6L_UjLhkvk4V7_7Rv0OzQWIo77OBxuD8FShPeyMNfmxyXV5In4_3ZGfNhxciOkQF6rCEJjxHTBBMLXlevvUMc6QO6vFi-3wPxsgnnu7EBI78dnHnBE_zAAXet2CC6P/s1600-h/image%25255B72%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKW2JHZNVEJpSOeWNYw1L0DBSf1aiNVXrsDuLOhO4G1SAvsx18oXjSJ_IdfJSupthUIyjIkNDYAKtZdWRgVsrZh5RQW1QgPlpQuC8q93Ll0ZwwSuGeTH95yXxpcswbW7WdMMMpy9rjHwoW/?imgmax=800" width="489" height="450"></a><sub></sub></p> <p>The Summary page is displayed. <strong>Click Finish ></strong></p> <p>The progress page will begin importing the database, and on completion <strong>Close.</strong></p> <p>The database will now display within Azure.</p> <p> </p> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsOxkWDRk-mQW3fhV4tbg6SeoocIRFP3ZnBdfcMoMRML6MrbOJMf-34Bl2IA75W9gVooougQmkDqnv_nhS3hVfUHbXbo-3oXK43aTV_jXcZYNTCZBSmyptnkc9Q1iFc3l3BVO4UdWvRZtH/s1600-h/image%25255B77%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAJrcRDD6MMOiJN_fP-4-ov4LIkSt3IeoYIMzEwfi9dCCvmhbBO2aM_FQGXZX4TA-IaROA3D1SmZ-lnMXTAZRstFeFc1017JXOwNHOhezGAmcH87MZK3QjdCwHaYuIKOX6VFNDSbM5YK8K/?imgmax=800" width="512" height="205"></a> <p>Moving the second database, follow similar steps. The second database can be added to the same server. For one Server, I am allowed to add up to 150 databases.</p> <p>The error can be handled another way:</p> <p>The following code creates a server-level firewall setting called <code>Allow Azure</code> that enables access from Azure.</p> <p><a href="http://msdn.microsoft.com/en-us/library/azure/ff951635.aspx" target="_blank">sp_set_firewall_rule (Azure SQL Database)</a></p> <p> <div id="codeSnippetWrapper"><pre id="codeSnippet" style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"><span style="color: #008000">-- Enable Azure connections.</span><br><span style="color: #0000ff">exec</span> sp_set_firewall_rule N<span style="color: #006080">'Allow Azure'</span>,<span style="color: #006080">'0.0.0.0'</span>,<span style="color: #006080">'0.0.0.0'</span><br></pre><br /><hr><br /></div></p><br /><blockquote><br /><p>This post is for the purpose of my notes only. <br><b><i>“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”</i></b></p></blockquote><br /><blockquote><br /><p><b><i>Henry Ford</i></b></p></blockquote> Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-39284060947144698482014-05-09T14:59:00.001-07:002016-09-30T11:19:25.138-07:00MVC 4.5 Adding Bundling to Empty ProjectSteps needed to add bundling to a new MVC 4.51 empty project.<br />
Add reference: <strong>Microsoft.AspNet.Web.Optimization</strong><br />
from the <strong>Package Manager Console</strong> enter:<br />
<ul>
<li>PM> Install-Package Microsoft.AspNet.Web.Optimization</li>
</ul>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmAhe25GSjM8dcpxQGw6830dXDgzQEZrc_DTdSUmgGUDi4z4se6GiwCxcw4oZ5DF533TOC0nlUyH3wBc_bnKkyUbiB8pErGwQJv9OOfUwpxy_TVEQcWMWr9y3llcNL73-y8_jJoAxbnGFP/s1600-h/image%25255B3%25255D.png"><img alt="image" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMK4QrQEEnTC1Gd4UTYsqPCVPzY_EQ7217vlqbjZ6H0FHd88KsWZzJvXSRz6dhxvThMbFZEFKoJDZz1ihyphenhyphenul0jt1nI3lnb6MGfMMrPAw10EfbzGN6UJPIPXhD8xT6KXdlrnNr04I3TGiP0/?imgmax=800" height="180" style="background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="568" /></a><br />
Adding Microsoft.AspNet.Web.Optimization, added a reference to the System.Web.Optimization namespace.<br />
System.Web.Optimization exposes:<br />
<ul>
<li><strong>BundleCollection</strong>: Contains and manages the set of registered Bundle objects in an ASP.NET application.
<li><strong>ScriptBundle</strong>: Represents a bundle object that does Js Minification.
<li><strong>StyleBundle</strong>: Represents a bundle object that does CSS minification.
<li><strong>BundleTable</strong>: Static holder class for the default bundle collection. </li>
</li>
</li>
</li>
</ul>
Additional : <a href="http://msdn.microsoft.com/en-http://msdn.microsoft.com/en-us/library/system.web.optimization(v=vs.110).aspx" target="_blank">MSDN</a><br />
<hr />
Within Views folder , add reference to web.config. Adding reference to web.config will support bundling Razor Html helpers: <strong>@Scripts </strong>on pages.<br />
<div>
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;"><</span><span style="color: maroon;">system.web.webPages.razor</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">host</span> <span style="color: red;">factoryType</span><span style="color: blue;">="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"</span> <span style="color: blue;">/></span>
<span style="color: blue;"><</span><span style="color: maroon;">pages</span> <span style="color: red;">pageBaseType</span><span style="color: blue;">="System.Web.Mvc.WebViewPage"</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">namespaces</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">add</span> <span style="color: red;">namespace</span><span style="color: blue;">="System.Web.Mvc"</span> <span style="color: blue;">/></span>
<span style="color: blue;"><</span><span style="color: maroon;">add</span> <span style="color: red;">namespace</span><span style="color: blue;">="System.Web.Mvc.Ajax"</span> <span style="color: blue;">/></span>
<span style="color: blue;"><</span><span style="color: maroon;">add</span> <span style="color: red;">namespace</span><span style="color: blue;">="System.Web.Mvc.Html"</span> <span style="color: blue;">/></span>
<span style="color: blue;"><</span><span style="color: maroon;">add</span> <span style="color: red;">namespace</span><span style="color: blue;">="System.Web.Routing"</span> <span style="color: blue;">/></span>
<span style="color: blue;"><</span><span style="color: maroon;">add</span> <span style="color: red;">namespace</span><span style="color: blue;">="FileUpload_MVC"</span> <span style="color: blue;">/></span>
<span style="color: blue;"><</span><span style="color: maroon;">add</span> <span style="color: red;">namespace</span><span style="color: blue;">="System.Web.Optimization"</span> <span style="color: blue;">/></span>
<span style="color: blue;"></</span><span style="color: maroon;">namespaces</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: maroon;">pages</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: maroon;">system.web.webPages.razor</span><span style="color: blue;">></span></pre>
</div>
<br />
<div>
</div>
<br />
<div>
Within Views folder, add reference to web.config file. This will support bundling Razor Html helpers <strong>@Styles</strong> on pages.</div>
<br />
<div>
</div>
<br />
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;"><</span><span style="color: maroon;">system.web</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">pages</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">namespaces</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">add</span> <span style="color: red;">namespace</span><span style="color: blue;">="System.Web.Optimization"</span> <span style="color: blue;">/></span>
<span style="color: blue;"></</span><span style="color: maroon;">namespaces</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: maroon;">pages</span><span style="color: blue;">></span>
'''
<span style="color: blue;"></</span><span style="color: maroon;">system.web</span><span style="color: blue;">></span></pre>
<br /></div>
<br />
<div>
<br />
<hr />
<br /></div>
<br />
Within App_Start folder, create a class named whatever you prefer; I will keep to convention and create a class called: <strong>BundlesConfig, which it’s signature expects a <strong>Bundlecollection</strong>.</strong><br />
<br />
I could call the class MyBundlesConfig, which it’s signature expects a <strong>Bundlecollection</strong>. <br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Ir2xOSqG6wFQAo9FvKag0eTekSarMPscj1abg79heYfRhRRKz4QisY2DiGl5uThP8wgbcf_X-JCm5ZXIKEoqO9kmchfZPO4ZBdESjsH1M8dM3SeIEklaBBe41E_pG_R0ikP13b5uCojP/s1600-h/image%25255B6%25255D.png"><img align="left" alt="image" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQR936vSeGgEMGan-8yZYEOl2E_8qz8NJLLicf3cB40fCZJUFn3VLzBNKiEFaUJFt0ZA62m4B5gQXa9ZVXlTqgLjp8eSldfvcynERaWbw4OzVCYamOlpEtx1sBYTHNWR5rE2MA7QMXdJ0b/?imgmax=800" height="244" style="background-image: none; border-width: 0px; display: inline; float: left; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="184" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZVVf4eVYgf7AxmNPQzXlzOTl27zzGVid-gvfp4wonFLjrR564ZlB9pa8sH6IPHP9pB0q_GGIglW5040l5kXJjADxI-Q4tB4P7la2y2UV8_1f3D7TVo-Hd8w__eBaRgJh3ePn4x9w5i1ff/s1600-h/image%25255B11%25255D.png"><img align="right" alt="image" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6qbRl_KJW1B5Ak8EgJXgcmw4xeeJiUSYfagxOaQbv-_2kDFU7kIm2H8FfB75QgjkPkXGYGBuzge8YNIccRU2JkmkOhILVGLKXG2dqVcc4LuyMYQlQfjaFk2HwOihk-lmsTRSKeM7WRxE5/?imgmax=800" height="249" style="background-image: none; border-width: 0px; display: inline; float: right; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="347" /></a><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Bundling JavaScript and CSS files.<br />
<br />
Add a static method to BundlesConfig which its signature accepts a BundleCollection type.<br />
<br />
Create respective bundle objects, expecting a string argument. String argument represents a virtual path where bundling files are located.<br />
<br />
Fictitious application relative URLs (“~/url”) are allowed as parameters. Could be thought as a namespace, so (~/MyFictitiousUrl) could be used, and doesn’t necessarily exist as a path within the file structure.<br />
<br />
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;">var scriptBundle = <span style="color: blue;">new</span> ScriptBundle(“~/bundles/Scripts”);;
var styleBundle = <span style="color: blue;">new</span> StyleBundel(“~/bundles/Styles”);</pre>
<br /></div>
<br />
Possible taking advantage of CDN by passing the path of a Content Delivery Network as the second parameter:<br />
<br />
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;">var scriptBundle = <span style="color: blue;">new</span> ScriptBundle(“~/bundles/Scripts”,”http://MyCDN”);</pre>
<br /></div>
<br />
<hr />
<br />
<br />
Include a set of files to be included in the bundle object.<br />
<br />
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;">var scriptFiles = <span style="color: blue;">new</span> <span style="color: blue;">string</span>[] { “~/Scripts/*.js” };
var styleFiles = <span style="color: blue;">new</span> <span style="color: blue;">string</span>[] { “~/Content/*.css” };
scriptBundle.Include(scriptFiles );
styleBundle .Include(styleFiles );</pre>
</div>
<br />
Possible passing only a string argument:<br />
<br />
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;">scriptBundle.Include(“~/Scripts/*.js”);
styleBundle .Include(“~/Content/*.css”);</pre>
<br /></div>
<br />
Above, the scriptBundle object will collect all JavaScript files located within the Scripts folder. styleBundle object will collect all CSS files located within the Content folder.<br />
<br />
Add bundle objects to <strong>BundleCollection</strong>.<br />
<br />
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;">bundles.Add(scriptBundle);
bundles.Add(styleBundle);</pre>
</div>
<br />
<div>
<br />
<hr />
<br />
<strong>BundleConfig.cs</strong></div>
<br />
<div>
<br />
<div>
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;">namespace FileUpload_MVC.App_Start
{
<span style="color: blue;">public</span> <span style="color: blue;">class</span> BundlesConfig
{
<span style="color: blue;">public</span> <span style="color: blue;">static</span> void RegisterBundles(BundleCollection bundles)
{
var scriptBundle = <span style="color: blue;">new</span> ScriptBundle("~/bundles/Scripts");
var scriptFiles = <span style="color: blue;">new</span> string[] { "~/Scripts/*.js" };
scriptBundle.<span style="color: blue;">Include</span>(scriptFiles);
var styleBundle = <span style="color: blue;">new</span> StyleBundle("~/bundles/Styles");
styleBundle.<span style="color: blue;">Include</span>("~/Content/*.css");
bundles.<span style="color: blue;">Add</span>(scriptBundle);
bundles.<span style="color: blue;">Add</span>(styleBundle);
}
}
}</pre>
</div>
<br />
<div>
<strong>Or… Using IncludeDirectory()</strong></div>
<br />
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;">namespace FileUpload_MVC.App_Start
{
<span style="color: blue;">public</span> <span style="color: blue;">class</span> BundlesConfig
{
<span style="color: blue;">public</span> <span style="color: blue;">static</span> void RegisterBundles(BundleCollection bundles)
{
var scriptBundle = <span style="color: blue;">new</span> ScriptBundle("~/bundles/Scripts");
scriptBundle.IncludeDirectory("~/Scripts", "*.js", <span style="color: blue;">true</span>);
var styleBundle = <span style="color: blue;">new</span> StyleBundle("~/bundles/Styles");
styleBundle.IncludeDirectory("~/Content", "*.css", <span style="color: blue;">true</span>);
bundles.<span style="color: blue;">Add</span>(scriptBundle);
bundles.<span style="color: blue;">Add</span>(styleBundle);
}
}
}</pre>
<br /></div>
<br />
<div>
<br />
<hr />
<br /></div>
<br />
<div>
With help of Razor Html Bundling helpers, add Bundling to Razor View:</div>
</div>
<br />
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;"><!</span><span style="color: maroon;">DOCTYPE</span> <span style="color: red;">html</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">html</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">head</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">meta</span> <span style="color: red;">charset</span><span style="color: blue;">="utf-8"</span> <span style="color: blue;">/></span>
<span style="color: blue;"><</span><span style="color: maroon;">meta</span> <span style="color: red;">name</span><span style="color: blue;">="viewport"</span> <span style="color: red;">content</span><span style="color: blue;">="width=device-width, initial-scale=1.0"</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">title</span><span style="color: blue;">></span>deDogs - File Upload Appication<span style="color: blue;"></</span><span style="color: maroon;">title</span><span style="color: blue;">></span>
@Styles.Render("~/bundles/Styles")
<span style="color: blue;"><</span><span style="color: maroon;">script</span> <span style="color: red;">src</span><span style="color: blue;">="~/Scripts/modernizr-2.6.2.js"</span><span style="color: blue;">></</span><span style="color: maroon;">script</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: maroon;">head</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">body</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">div</span><span style="color: blue;">></span>
@RenderBody()
<span style="color: blue;"><</span><span style="color: maroon;">hr</span> <span style="color: blue;">/></span>
<span style="color: blue;"><</span><span style="color: maroon;">footer</span><span style="color: blue;">></</span><span style="color: maroon;">footer</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: maroon;">div</span><span style="color: blue;">></span>
@Scripts.Render("~/bundles/Scripts")
<span style="color: blue;"></</span><span style="color: maroon;">body</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: maroon;">html</span><span style="color: blue;">></span></pre>
<br />
<br />
<hr />
<br /></div>
<br />
<div>
<br />
Within the Global.asax.cs file, register calling RegisterBundles(BundleCollection bundles).</div>
<br />
<div>
</div>
<br />
<div>
Reference System.Web.Optimization and passing a Bundles collection. BundleTable is a static holder class for the default bundle collection.</div>
<br />
<div>
</div>
<br />
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;">namespace</span> FileUpload_MVC
{
<span style="color: blue;">public</span> <span style="color: blue;">class</span> MvcApplication : System.Web.HttpApplication
{
<span style="color: blue;">protected</span> <span style="color: blue;">void</span> Application_Start()
{
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundlesConfig.RegisterBundles(BundleTable.Bundles);
}
}
}</pre>
<br /></div>
<br />
Possible to set BundleTable.EnableOptimizations: return true if bundling and minification of bundle references is enabled; otherwise, false.<br />
<br /><br />
<a href="http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification" target="_blank">Bundling and Minification </a><br />
<br />
<blockquote>
<br />
This post is for the purpose of my notes only. <br /><b><i>“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”</i></b></blockquote>
<br />
<blockquote>
<br />
<b><i>Henry Ford</i></b></blockquote>
Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-82730688842120719832014-05-06T18:12:00.001-07:002014-05-06T18:15:17.395-07:00Migration: Helpful When Seeding Database and Error is Thrown<p>Using Entity Framework Migration, I was seeding a database. </p> <p>From the Package Manager Console window and after entering Update-Database, an error was displayed.</p> <p><font color="#ff0000">Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.</font></p> <p>This was the only information about error, and the error message didn’t indicate any good advise what caused the error.</p> <p>Shown below is a work-around found at StackOverflow, which helped pin point the error.</p> <p><a href="https://stackoverflow.com/questions/10219864/ef-code-first-how-do-i-see-entityvalidationerrors-property-from-the-nuget-pac/15726942#15726942" target="_blank">Stackoverflow Overridding SaveChanges</a></p> <div id="codeSnippetWrapper"><pre id="codeSnippet" style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"><span style="color: #0000ff">public</span> <span style="color: #0000ff">partial</span> <span style="color: #0000ff">class</span> Database : DbContext<br>{<br> <span style="color: #0000ff">public</span> <span style="color: #0000ff">override</span> <span style="color: #0000ff">int</span> SaveChanges()<br> {<br> <span style="color: #0000ff">try</span><br> {<br> <span style="color: #0000ff">return</span> <span style="color: #0000ff">base</span>.SaveChanges();<br> }<br> <span style="color: #0000ff">catch</span> (DbEntityValidationException ex)<br> {<br> var sb = <span style="color: #0000ff">new</span> StringBuilder();<br><br> <span style="color: #0000ff">foreach</span> (var failure <span style="color: #0000ff">in</span> ex.EntityValidationErrors)<br> {<br> sb.AppendFormat(<span style="color: #006080">"{0} failed validation\n"</span>, failure.Entry.Entity.GetType());<br> <span style="color: #0000ff">foreach</span> (var error <span style="color: #0000ff">in</span> failure.ValidationErrors)<br> {<br> sb.AppendFormat(<span style="color: #006080">"- {0} : {1}"</span>, error.PropertyName, error.ErrorMessage);<br> sb.AppendLine();<br> }<br> }<br><br> <span style="color: #0000ff">throw</span> <span style="color: #0000ff">new</span> DbEntityValidationException(<br> <span style="color: #006080">"Entity Validation Failed - errors follow:\n"</span> +<br> sb.ToString(), ex<br> ); <span style="color: #008000">// Add the original exception as the innerException</span><br> }<br> }<br>}</pre><br></div><br /><blockquote><br /><p>This post is for the purpose of my notes only. <br><b><i>“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”</i></b></p></blockquote><br /><blockquote><br /><p><b><i>Henry Ford</i></b></p></blockquote> Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-24659490075276645612014-05-04T10:06:00.001-07:002014-05-04T12:28:14.969-07:00Entity First - Code First - Migrations Setup<strong>1. Created two window class project:</strong><br />
<ul>
<li>exposing the domain classes:
<li>exposing the DB context classes</li>
</li>
</ul>
<strong>2. Created a MVC 4.5.1 project</strong><br />
<hr />
<strong><span style="font-size: medium;">1. Created two window class projects:</span></strong><br />
<strong>Domain Classes</strong><br />
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;">using</span> System;
<span style="color: blue;">namespace</span> FileUpload.DomainClasses
{
<span style="color: blue;">public</span> <span style="color: blue;">class</span> Media
{
<span style="color: blue;">public</span> <span style="color: blue;">int</span> Id { get; set; }
<span style="color: blue;">public</span> <span style="color: blue;">int</span> MediaTypeId { get; set; }
<span style="color: blue;">public</span> <span style="color: blue;">string</span> Name { get; set; }
<span style="color: blue;">public</span> <span style="color: blue;">string</span> Title { get; set; }
<span style="color: blue;">public</span> <span style="color: blue;">string</span> Caption { get; set; }
<span style="color: blue;">public</span> <span style="color: blue;">string</span> Description { get; set; }
<span style="color: blue;">public</span> <span style="color: blue;">string</span> Path { get; set; }
<span style="color: blue;">public</span> <span style="color: blue;">int</span> Width { get; set; }
<span style="color: blue;">public</span> <span style="color: blue;">int</span> Height { get; set; }
<span style="color: blue;">public</span> DateTime IDate { get; set; }
<span style="color: blue;">public</span> DateTime UDate { get; set; }
<span style="color: blue;">public</span> <span style="color: blue;">virtual</span> MediaType MediaType { get; set; }
}
}</pre>
<br /></div>
<br /><div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;">namespace</span> FileUpload.DomainClasses
{
<span style="color: blue;">public</span> <span style="color: blue;">class</span> MediaType
{
<span style="color: blue;">public</span> <span style="color: blue;">int</span> Id { get; set; }
<span style="color: blue;">public</span> <span style="color: blue;">string</span> Name { get; set; }
<span style="color: blue;">public</span> <span style="color: blue;">string</span> Extension { get; set; }
}
}</pre>
<br /></div>
<br /><strong>DB Context Class</strong><br />
<br />Reaching the domain class add reference to FileUpload.DominClasses.<br />
<br />Within the constructor, explicitly set connection string name, which will be found within web.config.<br />
<br /><div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;">using</span> System.Collections.Generic;
<span style="color: blue;">using</span> System.Data.Entity;
<span style="color: blue;">using</span> System.Linq;
<span style="color: blue;">namespace</span> FileUpload.DataLayer
{
<span style="color: blue;">public</span> <span style="color: blue;">class</span> FileUploadContext : DbContext
{
<span style="color: blue;">public</span> FileUploadContext()
: <span style="color: blue;">base</span>(<span style="color: #006080;">"name=FileUploadContextDB"</span>)
{
}
<span style="color: blue;">public</span> DbSet<Media> Medias { get; set; }
<span style="color: blue;">public</span> DbSet<MediaType> MediaTypes { get; set; }
}
}</pre>
<br /></div>
<br /><strong>Connection String</strong><br />
<br />Within web.config, added two connection strings. <br />
<br /><ul><br />
<li>FileUploadContext <br />
<li>FileUploadContextDB </li>
</li>
</ul>
<br />FileUploadContext is name of the DB context class. If a connection string wasn’t explicitly set within the DB context class constructor, then a connection string with the context class name will be used. <br />
<br />However, the context class above has explicitly set the connection string within the constructor, so the FileUploadContextDB connection string is used.<br />
<br /><strong>web.config connectionStrings</strong><br />
<br /><div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;"><?</span><span style="color: maroon;">xml</span> <span style="color: red;">version</span><span style="color: blue;">="1.0"</span>?<span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">configuration</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">connectionStrings</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">add</span> <span style="color: red;">name</span><span style="color: blue;">="FileUploadContext"</span> <span style="color: red;">connectionString</span><span style="color: blue;">="Data Source=(localdb)\Projects;Initial Catalog=FileUploadContextDB;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False"</span> <span style="color: red;">providerName</span><span style="color: blue;">="System.Data.SqlClient"</span> <span style="color: blue;">/></span>
<span style="color: blue;"><</span><span style="color: maroon;">add</span> <span style="color: red;">name</span><span style="color: blue;">="FileUploadContextDB"</span> <span style="color: red;">connectionString</span><span style="color: blue;">="Data Source=DEDOGS-PC\DEDOGSSQL;Initial Catalog=FileUploadContextDB;Integrated Security=False;User ID=sa;Password=moclay9330;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False"</span> <span style="color: red;">providerName</span><span style="color: blue;">="System.Data.SqlClient"</span> <span style="color: blue;">/></span>
<span style="color: blue;"></</span><span style="color: maroon;">connectionStrings</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">system.web</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: maroon;">compilation</span> <span style="color: red;">debug</span><span style="color: blue;">="true"</span> <span style="color: red;">targetFramework</span><span style="color: blue;">="4.5.1"</span> <span style="color: blue;">/></span>
<span style="color: blue;"><</span><span style="color: maroon;">httpRuntime</span> <span style="color: red;">targetFramework</span><span style="color: blue;">="4.5.1"</span> <span style="color: blue;">/></span>
<span style="color: blue;"></</span><span style="color: maroon;">system.web</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: maroon;">configuration</span><span style="color: blue;">></span></pre>
<br /></div>
<br /><hr />
<br /><br /><strong><span style="font-size: medium;">2. Created a MVC 4.5.1 project</span></strong><br />
<br />Reaching the, add reference :<br />
<br /><ul><br />
<li>domain class, to FileUpload.DominClasses. <br />
<li>DB context, to FileUpload.DataLayer.</li>
</li>
</ul>
<br /><strong>Created a Controller with a View.</strong><br />
<br /><div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;">namespace</span> FileUpload_MVC.Controllers
{
<span style="color: blue;">public</span> <span style="color: blue;">class</span> HomeController : Controller
{
<span style="color: blue;">public</span> ActionResult Index()
{
<span style="color: blue;">using</span> (var context = <span style="color: blue;">new</span> FileUploadContext())
{
var medias = context.Medias.ToList();
}
<span style="color: blue;">return</span> View();
}
}
}</pre>
<br /></div>
<br />On the first attempt, when a database hasn’t been setup, asking for the Medias list, Entity Framework will create a database. The database scheme reflects the context class’ names and properties.<br />
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmMr77Y7pg0AE2WsIahbrnetGUBsQ_r3Vvr9zvhfuzeTZKJQuaN9c__ys_SpykermI3jkAXUvWyjnc4RbJVPrpv9rykB6L8M-iQK0l6Xf-PTTHa6HOX4wNA3yBOC1A1PoYb5OGwvcdJjRu/s1600-h/image%25255B7%25255D.png"><img alt="image" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcl9sB97IUIBnXdQvUlGGOsAHounoztRJpvmdeRMumb05tUnQ5-2S5cgi4xyCU4TYNgM6AlhMdvCIRZY86xXvpCMFP3e3Yo-Q-MXAobqbu-ggLjmuObCW7jmlDwVRKXNjPXeZKh58z1BzA/?imgmax=800" height="400" style="background-image: none; border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="238" /></a><br />
<br /><strong>Influence DB Scheme by Enabling Entity Framework Migrations Feature</strong><br />
<br />Migrations track changes with your C# code.<br />
<br />Within the Package Manager:<br />
<br /><strong>1.</strong> Select <strong>FileUploadDataLayer</strong> from Default project dropdown. <br />
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfI9ncpNOQQTAnAuqyWKd6mHq0QD7jCxMILRqtsqDT2CfRxSyixT29ECwQ_nqhcBOxYro1k8rqlpByZ-lclOaa2DlPIoW0bdtpbQfQRajeGzvNPZ_Xsi3mlIoG1q8MJmA7jLdC4xxFJSG4/s1600-h/pc%25255B4%25255D.jpg"><img alt="pc" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiprZP4uEWcsYYPa-ZMWtHTQtFvzp9NNfgpg2J4STNf0ctN1Nwvuon_nu6NCxl362ZBjEIXhnFqItu47hSsZmwzAHNP0fZwC51w9NJi3G0HfUbgHxUH0ebTwASHAhYBfWOEoiTh_YfYySla/?imgmax=800" height="206" style="background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="pc" width="488" /></a><br />
<br /><strong>2.</strong> Type<br />
<br />PM> Enable-Migrations –ContextTypeName <strong>FileUploadContext</strong><br />
<br />This will run migrations against the default project creating a Migrations folder in the FileUploadDataLayer project.<br />
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaTftvQT2GNwRydyNrjB-p45tm2zckCDq_TI0Srblyrd9OPHWSHx42QOT6cwOB04wxSAxFGEXP_KOPZZ5RnZFgpTJrA0AzRM61upj1GoCv_5xmtLqxZra9eTAuawzXvlN8pDQ8pTkma1jZ/s1600-h/image%25255B16%25255D.png"><img alt="image" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2a26WZI_J8y6pPRnJRErZ27TYy-0foD6OzBKzXBS-Es9ThT3sNnCmmfz69Mhe-qzULZ5pwA-1HC9jIRs27nb7TyGBvEU3G2kvmMba0UBkcVpa6kYbVpLOw-9NA1rrfnkuWnAVoyhdmzHg/?imgmax=800" height="124" style="background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="549" /></a><br />
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGzZHUamt6qDRz1oClGk49H9MSFxoiUfQ6xZKUK-jzgse_CBLeQm1oqUHl282cThsvtlQQm2NQFV7RaWStquLYBBR05mPZV4rHV7fOJkTjBktNfw4OIQjoliGszOlwjgHslQH4JhCl6X54/s1600-h/image%25255B20%25255D.png"><img alt="image" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi0p5cR7BTVsz7AU274l-WHYg220QTip_H3y377OJ_e0LysFXYF8qklDxLRaahEepHeEYzoG-zXcIOwV6-Py9oa8qPEnLIsf6Fx-T8PD4WvNfNfUcQ-Nkwa_aycYWMOmWjThkIddPNVqGf/?imgmax=800" height="156" style="background-image: none; border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="309" /></a><br />
<br /><strong>3.</strong> Within Configuration.cs, AutomaticMigrationsEnabled is set equal to false. Set AutomaticMigrationsEnabled equal to true. This will allow automatic changes to occur in the database. AutomaticMigrationsEnabled should only be set true in production or whenever working with beginning stages.<br />
<br /><div>
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;">namespace</span> FileUpload.DataLayer.Migrations
{
<span style="color: blue;">using</span> System;
<span style="color: blue;">using</span> System.Data.Entity;
<span style="color: blue;">using</span> System.Data.Entity.Migrations;
<span style="color: blue;">using</span> System.Linq;
<span style="color: blue;">internal</span> <span style="color: blue;">sealed</span> <span style="color: blue;">class</span> Configuration : DbMigrationsConfiguration<FileUpload.DataLayer.FileUploadContext>
{
<span style="color: blue;">public</span> Configuration()
{
AutomaticMigrationsEnabled = <span style="color: blue;">false</span>;
ContextKey = <span style="color: #006080;">"FileUpload.DataLayer.FileUploadContext"</span>;
}
<span style="color: blue;">protected</span> <span style="color: blue;">override</span> <span style="color: blue;">void</span> Seed(FileUpload.DataLayer.FileUploadContext context)
{
<span style="color: green;">// This method will be called after migrating to the latest version.</span>
<span style="color: green;">// You can use the DbSet<T>.AddOrUpdate() helper extension method </span>
<span style="color: green;">// to avoid creating duplicate seed data. E.g.</span>
<span style="color: green;">//</span>
<span style="color: green;">// context.People.AddOrUpdate(</span>
<span style="color: green;">// p => p.FullName,</span>
<span style="color: green;">// new Person { FullName = "Andrew Peters" },</span>
<span style="color: green;">// new Person { FullName = "Brice Lambson" },</span>
<span style="color: green;">// new Person { FullName = "Rowan Miller" }</span>
<span style="color: green;">// );</span>
<span style="color: green;">//</span>
}
}
}</pre>
</div>
<br /><div>
</div>
<br /><div>
<strong>4.</strong> Seed method allow automatically populating the database with data. Every time the database is updated it will run the seed method.</div>
<br /><div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;">protected</span> <span style="color: blue;">override</span> <span style="color: blue;">void</span> Seed(FileUpload.DataLayer.FileUploadContext context)
{
context.MediaTypes.AddOrUpdate(mt => mt.Name,
<span style="color: blue;">new</span> MediaType { Name = <span style="color: #006080;">"JPEG"</span>, Extension = <span style="color: #006080;">"jpg"</span> },
<span style="color: blue;">new</span> MediaType { Name = <span style="color: #006080;">"GIF"</span>, Extension = <span style="color: #006080;">"gif"</span> },
<span style="color: blue;">new</span> MediaType { Name = <span style="color: #006080;">"PNG"</span>, Extension = <span style="color: #006080;">"png"</span> }
);
context.Medias.AddOrUpdate(r => r.Name,
<span style="color: blue;">new</span> Media { Name = <span style="color: #006080;">"Kirk"</span>, UDate = DateTime.Now, IDate = DateTime.Now, MediaTypeId = 1 },
<span style="color: blue;">new</span> Media { Name = <span style="color: #006080;">"Kirk"</span>, UDate = DateTime.Now, IDate = DateTime.Now, MediaTypeId = 1 },
<span style="color: blue;">new</span> Media { Name = <span style="color: #006080;">"Kirk"</span>, UDate = DateTime.Now, IDate = DateTime.Now, MediaTypeId = 1 }
);
}</pre>
<br />
<strong>5.</strong> Within the Package Manager Console and FileUpload.Datalayer selected as default project, update database with this seed data.</div>
<br /><div>
</div>
<br /><div>
PM> Update-Database –Verbose</div>
<br /><div>
</div>
<br /><div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3OoPUaeSea_0FI8Va21x8ziR2bhg-CyMekx6P6qBa5Y8Bl_y7m4ibalPWbkYkt3zF2JK78_uXQhgWtmcd1LsUtSEjyPv0iQEEKhTRCy22qQtTMDFZ_z38XcFkCqSJwIUNAM8fRjScCYGV/s1600-h/image%25255B24%25255D.png"><img alt="image" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEtNOBzianvacQAmVr2S5jWi2KbrjcMssn3dP1c_JilXVBFjMM8myH3n5Uc9aLH8Ox2nnt0Ei69JMki-PGEWDzdDMCmMgiQ8tt4FlV5e6uagjNWRbXUY_M0A8j8XA5sTcc6RQ-tH1-PmRM/?imgmax=800" height="127" style="background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="530" /></a></div>
<br /><div>
</div>
<br /><strong>Migration SQL Script</strong> or <strong>Update Database</strong> are two ways when handling changes when class properties are added or removed.<br />
<br />If AutomaticMigrationsEnabled is set true, then by just running Update-Database from package manager will handle any scheme changes.<br />
<br />if AutomaticMigrationsEnabled is set false, then must use a Migration SQL Script. A migration script was created and is located in the Migration folder.<br />
<br /><div id="codeSnippetWrapper">
<pre id="codeSnippet" style="background-color: #f4f4f4; color: black; direction: ltr; font-family: "Courier New", courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"><span style="color: blue;">namespace</span> FileUpload.DataLayer.Migrations
{
<span style="color: blue;">using</span> System;
<span style="color: blue;">using</span> System.Data.Entity.Migrations;
<span style="color: blue;">public</span> <span style="color: blue;">partial</span> <span style="color: blue;">class</span> InitialCreate : DbMigration
{
<span style="color: blue;">public</span> <span style="color: blue;">override</span> <span style="color: blue;">void</span> Up()
{
CreateTable(
<span style="color: #006080;">"dbo.Media"</span>,
c => <span style="color: blue;">new</span>
{
Id = c.Int(nullable: <span style="color: blue;">false</span>, identity: <span style="color: blue;">true</span>),
MediaTypeId = c.Int(nullable: <span style="color: blue;">false</span>),
Name = c.String(),
Title = c.String(),
Caption = c.String(),
Description = c.String(),
Path = c.String(),
Width = c.Int(nullable: <span style="color: blue;">false</span>),
Height = c.Int(nullable: <span style="color: blue;">false</span>),
IDate = c.DateTime(nullable: <span style="color: blue;">false</span>),
UDate = c.DateTime(nullable: <span style="color: blue;">false</span>),
})
.PrimaryKey(t => t.Id)
.ForeignKey(<span style="color: #006080;">"dbo.MediaTypes"</span>, t => t.MediaTypeId, cascadeDelete: <span style="color: blue;">true</span>)
.Index(t => t.MediaTypeId);
CreateTable(
<span style="color: #006080;">"dbo.MediaTypes"</span>,
c => <span style="color: blue;">new</span>
{
Id = c.Int(nullable: <span style="color: blue;">false</span>, identity: <span style="color: blue;">true</span>),
Name = c.String(),
Extension = c.String(),
})
.PrimaryKey(t => t.Id);
}
<span style="color: blue;">public</span> <span style="color: blue;">override</span> <span style="color: blue;">void</span> Down()
{
DropForeignKey(<span style="color: #006080;">"dbo.Media"</span>, <span style="color: #006080;">"MediaTypeId"</span>, <span style="color: #006080;">"dbo.MediaTypes"</span>);
DropIndex(<span style="color: #006080;">"dbo.Media"</span>, <span style="color: blue;">new</span>[] { <span style="color: #006080;">"MediaTypeId"</span> });
DropTable(<span style="color: #006080;">"dbo.MediaTypes"</span>);
DropTable(<span style="color: #006080;">"dbo.Media"</span>);
}
}
}</pre>
<br /></div>
<br /><blockquote>
<br />
This post is for the purpose of my notes only. </blockquote>
<br /><blockquote>
<br />
<b><i>“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”</i></b></blockquote>
<br /><blockquote>
<br />
<b><i>Henry Ford</i></b></blockquote>
<br />Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0tag:blogger.com,1999:blog-3128161234871658086.post-21372642038707441642014-04-26T22:36:00.001-07:002014-05-17T19:21:58.499-07:00Lifecycle of an Asp.NET MVC 5 Application<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihNPQVRHJabNCnU0nCJ5G_CivcqB0wAqHVympgBMtnfbKL7sdMNpo-TYgP2BiAREb_n1SRr_iCqHtI29hSCtrY-e-BDzR8Bx3IrQwOnCgCvqMruKHwOYpxOGd-TAInNqv3IkCu1Lv7iogn/s1600-h/lifecycle-of-an-aspnet-mvc-5-application%25255B4%25255D.jpg"><img alt="lifecycle-of-an-aspnet-mvc-5-application" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPN4nmRSsXVZLion-q-IO15peQ3Rn6T1-mUnNVvSnELMx0cdgNyII9f8LHxpaNGWUSe3cDk8K0PZUIGhkFSOrAN-h3gcIzp0fESTvOqbCpVlEe6m7PQTdzYfwgcTBbnbUjNwYJP_Y-ZGLR/?imgmax=800" height="420" style="background-image: none; border-image: none; border: 0px currentColor; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="lifecycle-of-an-aspnet-mvc-5-application" width="544" /></a><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqQlAXm9FYCDwkem9jgEjL3C3A7kt_MNiOKjZZevOdJLAQVLOw1i9e-20NdQdmOy5BPjYkYu8gmknNGCdY8Z0G4G7Qrxrr4v_IbLGZeh1009AIlJ35j5NMip-fLDEZgoOiudFa1Ngj2_Gy/s1600-h/lifecycle-of-an-aspnet-mvc-5-application2%25255B5%25255D.jpg"><img alt="lifecycle-of-an-aspnet-mvc-5-application2" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-P8qhtsp7tUvdes74LxokxKbkJ60xN8JYa1Gxl_TUpuuDTxabBJiBRatPd3IaZBpvuM4pDH8LyKmgF5bSMfkTP2Ml2epYV_I_TJ8RWanEztUVFg_KCZaPaWg6nYc3a7iHx9FT1eLbxwdV/?imgmax=800" height="419" style="background-image: none; border-image: none; border: 0px currentColor; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="lifecycle-of-an-aspnet-mvc-5-application2" width="542" /></a><br />
<a href="http://i2.asp.net/media/4773381/lifecycle-of-an-aspnet-mvc-5-application.pdf?version_id=&cdn_id=2014-05-05-001" target="_blank">Lifecycle of an Asp.NET MVC 5 Application</a><br />
<blockquote>
This post is for the purpose of my notes only. </blockquote>
<blockquote>
<b><i>“I invented nothing new. I simply assembled the discoveries of other men behind whom were centuries of work. Had I worked fifty or ten or even five years before, I would have failed. So it is with every new thing. Progress happens when all the factors that make for it are ready and then it is inevitable. To teach that a comparatively few men are responsible for the greatest forward steps of mankind is the worst sort of nonsense.”</i></b></blockquote>
<blockquote>
<b><i>Henry Ford</i></b></blockquote>
Anonymoushttp://www.blogger.com/profile/00566076331650470250noreply@blogger.com0