h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Abstract -- C# Keywords

Abstract Classes and Abstract Methods in C#.NET

Abstract Classes:

  •   Provide default functionality to its sub classes.
  •   Contain methods with complete implementation, besides abstract methods.
  •   Contains at least one abstract method, then the class must be declared as abstract class.


//Abstract class
    abstract class <Class Name>
    {

        protected float <Var Name>;

        //Abstract methods can have only declarations
        public abstract <DataType> <Method Name>();
         ///Method with Paramenter
        public abstract <DataType> <Method Name>(<DataType> obj);

    }

class  <Class Name(child Class)> : <Class Name(Parent Name)>
{
        public Override <DataType> <Method Name>();
{
/// Write your Code
}

        public Override <DataType> <Method Name>(<DataType> obj);
{
/// Write your Code
}

}

Tips to improve Entity Framework Performance

Tips to improve Entity Framework Performance


  • Avoid to put all the DB Objects into One Single Entity Model
  • Disable change tracking for entity if not needed
  • Use Pre-Generating Views to reduce response time for first request
  • Avoid fetching all the fields if not required
  • Choose appropriate Collection for data manipulation
  • Use Compiled Query wherever needed
  • Retrieve only required number of records
  • Avoid using Contains
  • Avoid using Views
  • Debug and Optimize LINQ Query