public static int Insert(tblType type) { var db = new dbTrainEntities(ConnectionController.GetConnection()); type.CreatedDate = CommonFactory.GetCurrentDate(); type.ModifiedDate = CommonFactory.GetCurrentDate(); db.AddTotblTypes(type); return(db.SaveChanges()); }