Posts

Showing posts from July, 2017

Improve Performance of C# Code

Image
Improve Performance of C# Code This article helps you to know about the best coding practices that are used while coding using  C#  language. When we deliver code the created code should follow some standard which will improve optimization, readability, and quicker action on code that also improves the security aspects of code. Pascal Casing First characters of all words are Upper Case and other characters are lower case. Camel Casing   First characters of all words, except the first word are Upper Case and other characters are lower case. Check for 'null' Where ever there is possible for Null occurrence, make an explicit null check, this avoid the execution error. Remove Unused Using’s Using statement will load all the assemblies, so it’s better to remove unwanted assembly namespace reference in the codes. Indentation and Spacing It is recommended to use TAB space than a white space and this helps for better cod...

Upload image usng MVC 4

Image
How to upload Image File using MVC 4 step 1 Add New Class in  ""Product"    public class Products     {         [Key]         [Display(Name = "ProductId")]         public int ProductId { get; set; }         [Display(Name = "Name")]         public string Name { get; set; }         [Display(Name = "Price")]         public string Price { get; set; }         [Display(Name = "Image")]         public string Image { get; set; }         public int CREATED_BY_ID { get; set; }         public DateTime CREATED_DATE { get; set; }         public int UPDATED_BY_ID { get; set; }         public DateTime UPDATED_DATE { get; set; }     } ------ View ------ Index @model bootstrap_...