Archive

Posts Tagged ‘ASP.NET MVC’

April 11th 2012 Links: VB6, .NET Portable Class Libraries, Internet Explorer 10, ASP.NET MVC 4, eBooks

April 11, 2012 Leave a comment

Following the steps of Scott Guthrie’s link-listing series, here’s our new batch of links in our own series:

 

Windows

Support Statement for Visual Basic 6.0 on Windows Vista, Windows Server 2008, Windows 7, and Windows 8

Good news for those still using VB 6: it’ll be supported on Windows 8!

 

It’s the end of mainstream support for Windows Vista

April 10, 2012: That’s the date Windows Vista support moves from mainstream to extended (meaning paid for everything but security updates).

 

Visual Studio

Hidden Gems in Visual Studio 11 Beta – .NET Portable Class Libraries

Scott Hanselman details Portable Class Libraries which is a feature available in Visual Studio 2010 (through an extension) and in Visual Studio 11.

 

TFS 11 Power Tools Beta Available

Good news TFS 11 power tools (beta) are now publicly available Smile 

 

Dev

ASP.NET MVC 4 now open source

Yay! All sources are on CodePlex! if you haven’t already, go check them out because that’s some good looking .NET code Smile

 

The Danger of the Large Object Heap (LOH)

Another article which we like on the same subject is: “Large Object Heap Uncovered” (written by Maoni Stephens).

We actually wrote an article ourselves which is quite related to the subject as well: Manipulating SQL Blobs With Streams.

 

IndexedDB Updates for IE10 and Metro style apps

IndexedDB is a W3C Working Draft that enables you to store, search, and retrieve data on the user’s device, even when Internet connectivity is disabled.  IndexedDB is a feature of the Web platform shared by IE10 and Metro style apps in the Windows 8 Consumer Preview.”

Hmm, very interesting…

 

eBooks

Grab a free copy of “Under the hood of .NET Memory Management”

We did it, it was worthy, so we thought we’d share Winking smile

 

Free ebook: Introducing Microsoft SQL Server 2012

With SQL Server 2012 now available, I’m sure it’ll come in handy.

 

Cheers,

Carl Anderson

CodeFluent Entities: Attributes

February 23, 2012 1 comment

Using CodeFluent Entities you can define attributes on other concepts such as Entities, Methods or Properties and what gets really interesting is that the .NET Business Object Model Producer translates those CodeFluent Entities Attributes into actual .NET attributes Smile

Now say you want to specify some specific attributes on your generated .NET classes or data annotations on your properties, defining attributes in your model would be the way to go!

To do so select your concept such as a property and click on “Add Attribute” in the ribbon, the following dialog will show up:

image

In the attribute name set the full type name of your attribute such as System.ComponentModel.DataAnnotations.RequiredAttribute”.

Note: Setting the attribute class using the drop down list in the lower part of the form allows you to specify where this attribute should be placed in the generated classes. Default is in the entity class, but you can also place it in the service class, the service interface, or the proxy class.

In the screenshot below we defined a Required data annotation attribute on the Name property of our entity:

image

Then here’s the output after generating our model over:

[System.ComponentModel.DataAnnotations.RequiredAttribute()]
[System.ComponentModel.DefaultValueAttribute(default(string))]
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Type=typeof(string))]
public string Name
{
    (…)

To specify a parameter to your attribute, go back to your model, select your attribute and click on the Arguments property in the property grid:

image

And let’s add an error message to our required attribute:

image

Generate over and here’s the result:

[System.ComponentModel.DataAnnotations.RequiredAttribute(ErrorMessage="Name is required")]
[System.ComponentModel.DefaultValueAttribute(default(string))]
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Type=typeof(string))]
public string Name
{
    (…)

 

Carl Anderson

Follow

Get every new post delivered to your Inbox.

Join 700 other followers

%d bloggers like this: