gilf

Stories submitted by gilf

Generating ASP.NET MVC View Controls According to Xml Configurations(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 1 month, 3 days ago

Last week I was consulting about ASP.NET MVC at a customer. One of the customer project requirements is to generate forms according to Xml configuration files. In this post I’ll offer an end-to-end solution to this requirement. This solution can be rafactored to use databases or any other data sources in order to achieve the same results. read more...

2 comments |category: |Views: 101

tags: another

Avoiding Circular Reference for Entity in JSON Serialization(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 7 months, 10 days ago

One problem that I was facing yesterday while working on an ASP.NET MVC application was a JSON serialization issue. The problem was a circular reference caused by the DataContractJsonSerializer because of relations between the entity and other entities. In this post I’ll show you how you can use a simple workaround in order to avoid the problem. read more...

1 comment |category: |Views: 45

tags: another

Creating a Many To Many Mapping Using Code First(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 9 months, 26 days ago

Today I got a question about how to create a many to many mapping using Entity Framework Code First. The question was how to create the mapping with an existing database. Here is an explanation how to achieve that. read more...

add a comment |category: |Views: 9

tags: another

Using The Viewport Meta Tag(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 10 months, 3 days ago

Many smartphone browsers support the viewport meta tag which controls the logical dimensions and scaling of the browser’s viewport window. In this post I’m going to describe what is the viewport meta tag and how you can use it in your web pages. read more...

add a comment |category: |Views: 2

tags: another

Razor Helpers Syntax(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 10 months, 7 days ago

One hidden gem of Razor View Engine is the declarative helper syntax. With this syntax we can create helper components that are stored as .cshtml files, and enable reusability of view code. The name of the syntax might sound familiar and it is since it reminds the HtmlHelper class that was provided as part of MVC 1. In this post I’ll explain the Razor helper syntax and discuss why it sounds familiar to HtmlHelper. read more...

add a comment |category: |Views: 14

tags: another

ASP.NET MVC Model Binders(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 10 months, 8 days ago

One thing that I’m always asked to talk about when I’m delivering ASP.NET MVC sessions or courses is Model Binders. In this post I’ll explain what are Model Binders in ASP.NET MVC and how you can use them in your MVC application. read more...

add a comment |category: |Views: 7

tags: another

HTML5 – Selectors API Level 1(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 10 months, 15 days ago

Lately, I’m dealing a lot with HTML5. I co-authored a three days course in that topic for Sela, the company I work for. During the process of creating the course I got to learn a lot about HTML5 and what to expect from the new specifications so expect more posts about this subject in the near future. In this post I’m going to describe what is the JavaScript Selectors API Level 1 and compare it with jQuery. read more...

add a comment |category: |Views: 4

tags: another

Using Reverse Geocoding to Find an Address(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 11 months, 4 days ago

I had a request from a colleague of mine to help him with a geocoding problem. The colleague needed to find an address by a given latitude and longitude which were supplied by a smartphone consumer. The example in this post will show you how you can use Google geocoding API in order to achieve that using C#. read more...

add a comment |category: |Views: 9

tags: another

How to Configure a Self Reference in Code First(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 11 months, 24 days ago

A few days ago a worker in Sela asked me how to configure a self referencing entity with EF Code First. In this post I’ll show you how to implement that configuration. read more...

add a comment |category: |Views: 13

tags: another

Creating a Code First Database Initializer Strategy(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 11 months, 27 days ago

Yesterday I helped a colleague with his ASP.NET MVC 3 site deployment. That colleague implemented the data access layer using EF4.1 Code First. One of the restrictions that he had was that he didn’t have database permissions to create a new database and couldn’t use SQL Express or SQL CE in his application. Instead he had an empty database for his disposal in the hosting environment without a way to ru... read more...

add a comment |category: |Views: 12

tags: another

Visual Studio 2010 Image Optimizer Extension(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 1 year ago

One thing that caught my attention while watching the session that Mads Kristensen had in MIX11 was the Image Optimizer extension he is writing. This extension can be very valuable when you are trying to optimize your ASP.NET application (whether it is Web Forms or MVC 3). read more...

add a comment |category: |Views: 8

tags: another

A Tough Nugget – NuGet Package Manager(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 1 year ago

Once upon a time when a .Net developer wanted to install a third-party/open source component the amount of work he had to do was enormous. Things like downloading the component with all its dependencies, installing the latest component version, saving the component into source control, deploying the component with the application and more made this mission very hard and cumbersome. In other platforms such as Java and Ruby there ... read more...

add a comment |category: |Views: 12

tags: another

Not Just a Designer: Code First in Entity Framework Article (blogs.microsoft.co.il)

submitted by gilfgilf(2139) 1 year ago

Lately I wrote an article about Code First approach in Entity Framework 4.1 for Visual Studio Magazine. The article was published a few days ago and you can read it here. Enjoy! read more...

add a comment |category: |Views: 6

tags: another

WCF Data Services Processing Pipeline(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 1 year ago

First I must confess. Even tough I like OData and WCF Data Services, in the last couple of months I didn’t have the chance to work or use them. This is why when .NET 4 was shipped I haven’t noticed a new and interesting extension point in the framework – the processing pipeline. In the last MIX11 I got a little introduction to that extension point in Mike Flasko’s session. read more...

add a comment |category: |Views: 4

tags: another

Working with Client-Side Storage Using datajs Store API(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 1 year ago

One of the interesting features that datajs library includes is a store API which abstract the use of client-side storage mechanisms. You can use the store API in order to have a storage layer in your client-side and therefore reduce the calls for the server. Since datajs is only in alpha then this API might change in the future but even so I’ll explain and show a how to use it in this post. read more...

add a comment |category: |Views: 5

tags: another

Making a JSONP Call to a WCF Data Service using datajs(blogs.microsoft.co.il)

submitted by gilfgilf(2139) 1 year, 1 month ago

During MIX11 I attended a very interesting session about datajs which was presented by Asad Khan and Marcelo Lopez Ruiz. As I promised in my previous post, in this post I’ll show you how to make a JSONP call to a WCF Data Service using datajs library. read more...

add a comment |category: |Views: 12

tags: another