$(window).bind("load", function() {
// code here
});
Dotnetinaction
Saturday, January 3, 2015
Tuesday, November 18, 2014
Saturday, November 15, 2014
Friday, June 28, 2013
Microsoft e-book gallery
Please see this link for free ebooks available from Microsoft.
http://social.technet.microsoft.com/wiki/contents/articles/11608.e-book-gallery-for-microsoft-technologies.aspx
http://social.technet.microsoft.com/wiki/contents/articles/11608.e-book-gallery-for-microsoft-technologies.aspx
Thursday, June 6, 2013
Entity Framework 5.0 - Set Nullable and NON Nullable columns using code first approach
To set column is not null using code first approach using entity framework set REQUIRED attribute to the property in class.
Example:-
public class TemplateType
{
[Key]
public int TemplateTypeId { get; set; }
[Column(TypeName="varchar")]
[Required]
[MaxLength(30)]
public string TemplateName { get; set; }
public int CreatedBy { get; set; }
public DateTime CreatedOn { get; set; }
}
Inversely since Integer and Datetime cannot be null unless and until explicitly defined code first will generate schema for these types with NOT NULL in database.
To create a NULLABLE column in DB using Code First mark the property as NULLABLE(?).
Example:-
public int? ModifiedBy { get; set; }
public DateTime? ModifiedOn { get; set; }
Hope this helps.
Thursday, April 11, 2013
Visual Studio 2012 Keyboard shortcuts
Good article for creating custom keyboard shortcuts and predefined shortcuts.
http://msdn.microsoft.com/en-gb/library/5zwses53.aspx
http://msdn.microsoft.com/en-gb/library/da5kh0wa.aspx
Cheers
Subscribe to:
Posts (Atom)