Another Salesforce blog!!!

Salesforce, Apex

MVC

Checking if the value of type DateTime is null

@(item.Startdate.HasValue ? item.Startdate.Value.ToString(“dd/MM/yyyy”) : “Date is Empty”)

ConnectionStrings – (Localdb)\v11.0

[cc] <add name=”SimpleSecurityConnection1″ connectionString=”Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\aspnet-RefApp-20131021102513.mdf;Initial Catalog=aspnet-RefApp-20131021102513;Integrated Security=True” providerName=”System.Data.SqlClient” /> [/cc]  

DBContext & DBSet

DbContext: Is a simplified alternative to ObjectContext and is the primary object for interacting with a database using a specific model. DbSet: Is a simplified alternative to ObjectSet and is used to perform CRUD operations against a specific type from the model. DbContext and DbSet is used for the CodeFirst approach. Which enables a very […]