Tagged with mvc3

MVC3 Retrieving the browser Url

Code Snippet Public Module MyUrlExtensions     <Extension()> _     Public Function UrlOriginal(ByVal request As HttpRequestBase) As Uri         Dim hostHeader As String = request.Headers(“host”)         Return New Uri(String.Format(“{0}://{1}{2}“, request.Url.Scheme, hostHeader, request.RawUrl))     End Function End Module Advertisements

EF Code first with MVC 3 scaffholding.

Here’s a sample of Code first and the MVC 3 scaffholding in action, in order to run it you’ll need the MVC 3 Tools Update extension and the Nuget package for MvcScaffholding. The schema is pretty simple: Dowload the source code.