Geeks With Blogs

News TFS is just too much fun not to share. So, along with some of my TFS colleagues, we have organized a local TFS community.
Check us out.
TFS Austin Agile SCM Talk Visual Studio ALM Team Foundation Server Practice December 2012 Entries
LINQ (C#) Many to Many Query using Entity Framework
Using a MVC 4 Code First project I noticed that my intermediate table between a many to many relationship was missing. In other words, Table 1 has many Table 3, and Table 3 has many Table 1. In the database schema, Table 2 is my intermediate table: Table 1 has many Table 2 and Table 2 has only one Table1 Table 3 has many Table 2 and Table 2 has only one Table3, as follows: However, as I stated earlier, I did not have a model class for Table 2. At first I was miffed, but once I was able to craft the ......

Posted On Thursday, December 27, 2012 10:44 AM

ASP.NET MVC 4 - My FAQs
Here are some FAQs on things that were not so obvious. I’ll continue to add to this list over time. 1. Passing HtmlAttributes using @Html.ActionLink @Html.ActionLink("Create New", "Create", null, new { style="font-size: .75em; font-weight: normal; padding-left: 15px;" }) 2. Html.EditFor with multiline and word wrap support Use the following data annotation in the model class: [DataType(DataType.Multilin... public string TextField { get; set; } This requies the following using statement in the ......

Posted On Friday, December 21, 2012 9:32 AM

MVC4 Razor @Html.DropDownList with Entity Framework Code First
Controller ViewData["Projects"] = new SelectList(db.Projects.Sele... => r.ProjectName)); View @Html.DropDownList("Projects") There were many complicated examples, but this worked for me. However, I needed to pull from a database and manipulate the data before populating the dropdown. Here’s what I ended up with: Controller //retrieve the list of projects from the projects table var ProjectQry = (from p in db.Projects orderby p.Project_Name select new { projectName = p.Project_Name, ID = p.ID ......

Posted On Tuesday, December 18, 2012 11:09 AM

Entity Framework for Visual Studio 2012 Update 1: Reverse Engineer Bug and System.Data.Entity.Infrastructure
I had a couple of minor delays setting up Entity Framework in Visual Studio 2012 Update 1. Reverse engineering the database failed with the following error: “A processor named 'T4VSHost' could not be found for the directive named 'CleanupBehavior'. The transformation will not be run.” The work around for C# projects is to: Open the File C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions... Framework Tools\Templates\Includes\EF... (for C#) And ......

Posted On Friday, December 14, 2012 3:17 PM

Simple TFS 2012 API Methods: List Projects in a Collection and Import WIT Definitions
I found a lot of code to do these things, but really appreciated a more concise and simple approach. For example, this can be run as a unit test.   --> using System; using Microsoft.VisualStudio.Test... using System.Xml; using System.Collections.Generic; using System.Linq; using Microsoft.TeamFoundation.Se... using Microsoft.TeamFoundation.Co... using Microsoft.TeamFoundation.Cl... using Microsoft.TeamFoundation.Wo... using Microsoft.TeamFoundation.Fr... ......

Posted On Friday, December 14, 2012 9:58 AM

Copyright © Bob Hardister | Powered by: GeeksWithBlogs.net | Join free