5 // Copyright (c) 2007-2008 Jiri Moudry, Pascal Craponne
\r
7 // Permission is hereby granted, free of charge, to any person obtaining a copy
\r
8 // of this software and associated documentation files (the "Software"), to deal
\r
9 // in the Software without restriction, including without limitation the rights
\r
10 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
\r
11 // copies of the Software, and to permit persons to whom the Software is
\r
12 // furnished to do so, subject to the following conditions:
\r
14 // The above copyright notice and this permission notice shall be included in
\r
15 // all copies or substantial portions of the Software.
\r
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
18 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
\r
19 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
\r
20 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
\r
21 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
\r
22 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
\r
27 using System.Collections;
\r
28 using System.Data.Linq;
\r
32 namespace System.Data.Linq
\r
34 namespace DbLinq.Data.Linq
\r
37 public partial interface ITable : IEnumerable, IQueryable
\r
40 /// Gets the context.
\r
42 /// <value>The context.</value>
\r
43 DataContext Context { get; }
\r
45 /// Gets a value indicating whether this instance is read only.
\r
48 /// <c>true</c> if this instance is read only; otherwise, <c>false</c>.
\r
50 bool IsReadOnly { get; }
\r
52 /// Attaches the specified entity.
\r
54 /// <param name="entity">The entity.</param>
\r
55 void Attach(object entity);
\r
57 /// Attaches the specified entity.
\r
59 /// <param name="entity">The entity.</param>
\r
60 /// <param name="asModified">if set to <c>true</c> [as modified].</param>
\r
61 void Attach(object entity, bool asModified);
\r
63 /// Attaches the specified entity.
\r
65 /// <param name="entity">The entity.</param>
\r
66 /// <param name="original">The original.</param>
\r
67 void Attach(object entity, object original);
\r
69 /// Attaches all entities.
\r
71 /// <param name="entities">The entities.</param>
\r
72 void AttachAll(IEnumerable entities);
\r
74 /// Attaches all entites.
\r
76 /// <param name="entities">The entities.</param>
\r
77 /// <param name="asModified">if set to <c>true</c> [as modified].</param>
\r
78 void AttachAll(IEnumerable entities, bool asModified);
\r
80 /// Marks entities as to be deleted.
\r
82 /// <param name="entities">The entities.</param>
\r
83 void DeleteAllOnSubmit(IEnumerable entities);
\r
85 /// Marks entity as to be deleted.
\r
87 /// <param name="entity">The entity.</param>
\r
88 void DeleteOnSubmit(object entity);
\r
90 /// Gets the modified members.
\r
92 /// <param name="entity">The entity.</param>
\r
93 /// <returns></returns>
\r
94 ModifiedMemberInfo[] GetModifiedMembers(object entity);
\r
96 /// Gets the state of the original entity.
\r
98 /// <param name="entity">The entity.</param>
\r
99 /// <returns></returns>
\r
100 object GetOriginalEntityState(object entity);
\r
102 /// Marks all entities to be inserted.
\r
104 /// <param name="entities">The entities.</param>
\r
105 void InsertAllOnSubmit(IEnumerable entities);
\r
107 /// Marks entity to be inserted.
\r
109 /// <param name="entity">The entity.</param>
\r
110 void InsertOnSubmit(object entity);
\r