Geeks With Blogs
Etienne Giust's .NET notes Some .NET tips and tricks for me to remember. That might help you too
Here is a problem I encountered recently trying to perform a simple SQL operation using method syntax of Entity Framework. I had 2 IEnumerable<Object> datasets (dataset1 and dataset2). I wanted to join them to obtain a third dataset without loosing dataset1 records not referencing dataset2 records. To put it simply, I needed a Left Join from dataset1 ......

The goal here is to use SSDT SqlPackage to deploy the output of a Visual Studio 2012 Database project… a bit in the same fashion that was detailed here : http://geekswithblogs.net/8... The difference is we want to do it on an environment where Visual Studio 2012 ......

For our continuous integration needs, we use a powershell script to handle deployment. A simpler approach would be to have a deployment task embedded within the build process. See the solution provided here by Jakob Ehn (a most interesting read which also dives into the '”deploying from Visual Studio” specifics) : http://geekswithblogs.net/j... ......

With Visual Studio 2012 and the use of SSDT technology, there is only one type of database project : SQL Server Database Project. With Visual Studio 2010, we used to have SQL Server 2008 Server Project which we used to define server-level objects, mostly logins and linked servers. A convenient wizard allowed for creation of this type of projects. It ......

Visual Studio 2012 introduces a change regarding Database Projects : they now use the SSDT technology, which means old VS2010 database projects (VSDB projects) need to be converted. Hopefully, VS2012 does that for you and it is quite painless, but in my case some unnecessary artifacts from the old project were left in place. Also, when reopening the ......

At the office, we extensively use VS2010 SQL Server 2008 Database Projects and SQL Server 2008 Server Projects in our Visual Studio 2010 solutions. With Visual Studio 2012, those types of projects are replaced by the SQL Server Database Project using the SSDT (SQL Server Data Tools) technology. I started investigating the shift from Visual Studio 2010 ......

With MVC3, I came over that problem where I was rendering a view with an updated model at the end of an HttpPost and the changes to the model were never applied to the rendered view : NOT working as expected ! [HttpPost] public ActionResult Edit(JobModel editedJobModel) { // Update some model property editedJobModel.IsActive = true; // The view will ......

Today, I had a hard time unit testing a function to make sure a Method with some array parameters was called. Method to be called : void AddUsersToRoles(string[] usernames, string[] roleNames); I had previously used Arg<T>.Matches on complex types in other unit tests, but for some reason I was unable to find out how to apply the same logic with ......

I’m using ASP.NET MVC 3. I was used to rely on filterContext.RouteData.Values to get parameters from the url var idEdited = filterContext.RouteData.Val... This works fine as long as the url does not have specific parameters, like here: http://www.mysite.com/myapp... However, when the parameter is not a routevalue anymore, ......

I use MVC4 with razor. I ran into the problem of formating correctly a DateTime property of my model that I render in the view using a TextBoxFor MVC helper. The default formatting displays the full date with hours, minutes and seconds : @Html.TextBoxFor(m => m.BeginDate) displays “27/04/2012 00:00:00” in the textbox. I only needed the first part ......

Copyright © Etienne Giust | Powered by: GeeksWithBlogs.net | Join free