public static void Insert(TEntity entity, bool submitChanges) { #region Validation if (entity == null) { throw new ArgumentNullException("entity"); } #endregion EntityTable.InsertOnSubmit(entity); if (submitChanges) { DataContext.SubmitChanges(); } }