public static int Insert(tblCompany company) { var db = new dbTrainEntities(ConnectionController.GetConnection()); company.CreatedDate = CommonFactory.GetCurrentDate(); company.ModifiedDate = CommonFactory.GetCurrentDate(); db.AddTotblCompanies(company); return(db.SaveChanges()); }