Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / UI / WebControls / LinqToSqlWrapper.cs / 1305376 / LinqToSqlWrapper.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
#if ORYX_VNEXT
namespace Microsoft.Web.Data.UI.WebControls {
#else
namespace System.Web.UI.WebControls {
#endif
using System.Reflection;
using System.Data.Linq;
internal class LinqToSqlWrapper : ILinqToSql {
public void Add(ITable table, object row) {
table.InsertOnSubmit(row);
}
public void Attach(ITable table, object row) {
table.Attach(row);
}
public object GetOriginalEntityState(ITable table, object row) {
return table.GetOriginalEntityState(row);
}
public void Refresh(DataContext dataContext, RefreshMode mode, object entity) {
dataContext.Refresh(mode, entity);
}
public void Remove(ITable table, object row) {
table.DeleteOnSubmit(row);
}
public void SubmitChanges(DataContext dataContext) {
dataContext.SubmitChanges();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
#if ORYX_VNEXT
namespace Microsoft.Web.Data.UI.WebControls {
#else
namespace System.Web.UI.WebControls {
#endif
using System.Reflection;
using System.Data.Linq;
internal class LinqToSqlWrapper : ILinqToSql {
public void Add(ITable table, object row) {
table.InsertOnSubmit(row);
}
public void Attach(ITable table, object row) {
table.Attach(row);
}
public object GetOriginalEntityState(ITable table, object row) {
return table.GetOriginalEntityState(row);
}
public void Refresh(DataContext dataContext, RefreshMode mode, object entity) {
dataContext.Refresh(mode, entity);
}
public void Remove(ITable table, object row) {
table.DeleteOnSubmit(row);
}
public void SubmitChanges(DataContext dataContext) {
dataContext.SubmitChanges();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ErrorFormatter.cs
- HttpClientCertificate.cs
- SizeConverter.cs
- HostProtectionException.cs
- ToolStripDropTargetManager.cs
- SpecularMaterial.cs
- COM2IDispatchConverter.cs
- BasicHttpBindingCollectionElement.cs
- ModelUIElement3D.cs
- FieldMetadata.cs
- PackageRelationshipSelector.cs
- KeyPressEvent.cs
- BadImageFormatException.cs
- DoubleCollectionConverter.cs
- DispatchOperationRuntime.cs
- CellParagraph.cs
- Operators.cs
- XmlILConstructAnalyzer.cs
- DataServiceRequest.cs
- SqlComparer.cs
- AsymmetricAlgorithm.cs
- TableCell.cs
- TemplateBamlRecordReader.cs
- ValidatorCollection.cs
- XamlPointCollectionSerializer.cs
- Mapping.cs
- RelationshipManager.cs
- XsltFunctions.cs
- sitestring.cs
- SqlUdtInfo.cs
- SafeEventLogReadHandle.cs
- CodeTypeMemberCollection.cs
- PropertyEmitterBase.cs
- BinaryReader.cs
- FontUnitConverter.cs
- OleDbInfoMessageEvent.cs
- WriterOutput.cs
- DataTableReaderListener.cs
- Funcletizer.cs
- DataServiceRequest.cs
- TaskSchedulerException.cs
- DbDataAdapter.cs
- KnownTypeAttribute.cs
- InputScope.cs
- CollectionChangeEventArgs.cs
- ReturnEventArgs.cs
- URLBuilder.cs
- Utils.cs
- IPipelineRuntime.cs
- TextFormatter.cs
- columnmapkeybuilder.cs
- OdbcConnectionFactory.cs
- XmlSchemaComplexContent.cs
- NativeMethodsCLR.cs
- SafeSecurityHelper.cs
- SmiTypedGetterSetter.cs
- RectangleConverter.cs
- GridLength.cs
- NavigationCommands.cs
- TextParaClient.cs
- WsdlInspector.cs
- TextTrailingCharacterEllipsis.cs
- WindowsAuthenticationEventArgs.cs
- DesigntimeLicenseContextSerializer.cs
- GlyphRun.cs
- Util.cs
- ItemsControl.cs
- MediaElement.cs
- DefinitionBase.cs
- HttpCachePolicy.cs
- Point.cs
- TreeNodeStyle.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- GenericUriParser.cs
- SHA256.cs
- ImageField.cs
- IndexingContentUnit.cs
- XPathMessageContext.cs
- ErrorActivity.cs
- counter.cs
- Rotation3DAnimationUsingKeyFrames.cs
- Interlocked.cs
- DetailsViewPagerRow.cs
- Constraint.cs
- ISAPIWorkerRequest.cs
- SQLMembershipProvider.cs
- ShapingEngine.cs
- NamedPipeTransportManager.cs
- UIElementCollection.cs
- MetadataAssemblyHelper.cs
- WizardForm.cs
- PeerNameRecordCollection.cs
- xmlglyphRunInfo.cs
- Point4D.cs
- ToolStripDropDownMenu.cs
- WebControlParameterProxy.cs
- DbConnectionPool.cs
- Operand.cs
- UniqueEventHelper.cs
- Trace.cs