diff --git a/Aspects/Linq/Expressions/Serialization/NuGet/ExpressionSerialization.nuspec b/Aspects/Linq/Expressions/Serialization/NuGet/ExpressionSerialization.nuspec index 8438956..1cc63ef 100644 --- a/Aspects/Linq/Expressions/Serialization/NuGet/ExpressionSerialization.nuspec +++ b/Aspects/Linq/Expressions/Serialization/NuGet/ExpressionSerialization.nuspec @@ -2,7 +2,7 @@ AspectExpressionSerialization - 1.0.42 + 1.0.43 Val Melamed Val Melamed diff --git a/Aspects/Linq/Expressions/Serialization/Properties/AssemblyInfo.cs b/Aspects/Linq/Expressions/Serialization/Properties/AssemblyInfo.cs index 3c746ba..a816114 100644 --- a/Aspects/Linq/Expressions/Serialization/Properties/AssemblyInfo.cs +++ b/Aspects/Linq/Expressions/Serialization/Properties/AssemblyInfo.cs @@ -4,9 +4,9 @@ [assembly: AssemblyTitle("vm.Aspects.Linq.Expressions.Serialization")] [assembly: AssemblyDescription("Serializes and deserializes LINQ expression trees to and from XML documents.")] -[assembly: AssemblyVersion("1.0.42")] -[assembly: AssemblyFileVersion("1.0.42")] -[assembly: AssemblyInformationalVersion("1.0.42")] +[assembly: AssemblyVersion("1.0.43")] +[assembly: AssemblyFileVersion("1.0.43")] +[assembly: AssemblyInformationalVersion("1.0.43")] [assembly: InternalsVisibleTo( "vm.Aspects.Linq.Expressions.Serialization.Test, " + diff --git a/Aspects/Model/EFRepository/EFRepositoryBase.IRepository.cs b/Aspects/Model/EFRepository/EFRepositoryBase.IRepository.cs index a968fd8..acfe7d2 100644 --- a/Aspects/Model/EFRepository/EFRepositoryBase.IRepository.cs +++ b/Aspects/Model/EFRepository/EFRepositoryBase.IRepository.cs @@ -306,6 +306,21 @@ public IRepository Delete( /// public IQueryable DetachedEntities() where T : BaseDomainEntity => Set().AsNoTracking(); + /// + /// Gets a collection of all values of type from the repository and detaches them from the context/session. + /// + /// The type of the entities to be returned. + /// + /// sequence. + /// + /// + /// This method returns the DDD's aggregate source for the given type. The objects however are supposed to be "detached" from the repository's + /// context and any modifications on them will not be saved unless they are re-attached. This method gives a chance for performance optimization for some ORM-s in + /// fetching read-only objects from the repository. + /// Hint: The result of this method can participate in the from clause of a LINQ expression. + /// + public IQueryable DetachedValues() where T : BaseDomainValue => Set().AsNoTracking(); + /// /// Saves the changes buffered in the repository's context. /// diff --git a/Aspects/Model/EFRepository/EFRepositoryBase.cs b/Aspects/Model/EFRepository/EFRepositoryBase.cs index 242a865..6dceda2 100644 --- a/Aspects/Model/EFRepository/EFRepositoryBase.cs +++ b/Aspects/Model/EFRepository/EFRepositoryBase.cs @@ -18,8 +18,6 @@ namespace vm.Aspects.Model.EFRepository { - - /// /// Class EFRepositoryBase. Implements with Entity Framework . /// diff --git a/Aspects/Model/InMemory/ListObjectsRepository.cs b/Aspects/Model/InMemory/ListObjectsRepository.cs index 7b33b55..eb964b7 100644 --- a/Aspects/Model/InMemory/ListObjectsRepository.cs +++ b/Aspects/Model/InMemory/ListObjectsRepository.cs @@ -376,6 +376,21 @@ public IQueryable Values() where T : BaseDomainValue /// public IQueryable DetachedEntities() where T : BaseDomainEntity => Entities(); + /// + /// Gets from the repository a collection of detached from the current context/session values of type . + /// + /// The type of the values to be returned. + /// sequence. + /// + /// This method returns the DDD's aggregate source for the given type. The objects however are supposed to be "detached" + /// from the repository's context and any modifications on them will not be saved unless they are re-attached. + /// This method gives a chance for performance optimization for some ORM-s in fetching read-only objects from the repository. + /// The implementing class may however delegate this implementation to . + /// + /// Hint: The result of this method can participate in the from clause of a LINQ expression. + /// + public IQueryable DetachedValues() where T : BaseDomainValue => Values(); + /// /// Saves the changes buffered in the repository's context. /// diff --git a/Aspects/Model/InMemory/MapObjectsRepository.cs b/Aspects/Model/InMemory/MapObjectsRepository.cs index 153826b..86a09ce 100644 --- a/Aspects/Model/InMemory/MapObjectsRepository.cs +++ b/Aspects/Model/InMemory/MapObjectsRepository.cs @@ -422,6 +422,21 @@ public IQueryable Values() where T : BaseDomainValue /// public IQueryable DetachedEntities() where T : BaseDomainEntity => Entities(); + /// + /// Gets from the repository a collection of detached from the current context/session values of type . + /// + /// The type of the values to be returned. + /// sequence. + /// + /// This method returns the DDD's aggregate source for the given type. The objects however are supposed to be "detached" + /// from the repository's context and any modifications on them will not be saved unless they are re-attached. + /// This method gives a chance for performance optimization for some ORM-s in fetching read-only objects from the repository. + /// The implementing class may however delegate this implementation to . + /// + /// Hint: The result of this method can participate in the from clause of a LINQ expression. + /// + public IQueryable DetachedValues() where T : BaseDomainValue => Values(); + /// /// Saves the changes buffered in the repository's context. /// diff --git a/Aspects/Model/Properties/AssemblyInfo.cs b/Aspects/Model/Properties/AssemblyInfo.cs index b68f37a..f6656a4 100644 --- a/Aspects/Model/Properties/AssemblyInfo.cs +++ b/Aspects/Model/Properties/AssemblyInfo.cs @@ -3,9 +3,9 @@ [assembly: AssemblyTitle("vm.Aspect.Model")] [assembly: AssemblyDescription("Defines the IRepository and related base classes and utilities - a framework of building domain object model.")] -[assembly: AssemblyVersion("1.0.42")] -[assembly: AssemblyFileVersion("1.0.42")] -[assembly: AssemblyInformationalVersion("1.0.42")] +[assembly: AssemblyVersion("1.0.43")] +[assembly: AssemblyFileVersion("1.0.43")] +[assembly: AssemblyInformationalVersion("1.0.43")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo( "vm.Aspects.Model.Tests, " + diff --git a/Aspects/Model/Repository/IRepository.cs b/Aspects/Model/Repository/IRepository.cs index 19e3aca..9bde203 100644 --- a/Aspects/Model/Repository/IRepository.cs +++ b/Aspects/Model/Repository/IRepository.cs @@ -148,7 +148,7 @@ T GetByKey(TKey key) IQueryable Values() where T : BaseDomainValue; /// - /// Gets a collection of all instances of type from the repository and detaches them from the context/session. + /// Gets a collection of all entities of type from the repository and detaches them from the context/session. /// /// The type of the instances to be returned. /// sequence. @@ -163,6 +163,22 @@ T GetByKey(TKey key) /// IQueryable DetachedEntities() where T : BaseDomainEntity; + /// + /// Gets a collection of all values of type from the repository and detaches them from the context/session. + /// + /// The type of the values to be returned. + /// sequence. + /// + /// This method returns the DDD's values represented by the given type. The objects however are supposed to be "detached" + /// from the repository's context and any modifications on them will not be saved unless they are re-attached. + /// This method gives a chance for performance optimization for some ORM-s in fetching read-only objects from the repository. + /// The implementing class may however delegate this implementation to . + /// + /// Hint: The result of this method can participate in the from clause of a LINQ expression. + /// + /// + IQueryable DetachedValues() where T : BaseDomainValue; + /// /// Saves the changes buffered in the repository's context. /// diff --git a/Aspects/Model/Repository/IRepositoryAsync.cs b/Aspects/Model/Repository/IRepositoryAsync.cs index af194e2..8d5fbe7 100644 --- a/Aspects/Model/Repository/IRepositoryAsync.cs +++ b/Aspects/Model/Repository/IRepositoryAsync.cs @@ -178,6 +178,11 @@ public IQueryable DetachedEntities() where T : BaseDomainEntity throw new NotImplementedException(); } + public IQueryable DetachedValues() where T : BaseDomainValue + { + throw new NotImplementedException(); + } + public IRepository CommitChanges() { throw new NotImplementedException(); diff --git a/Aspects/Model/Repository/IRepositoryContracts.cs b/Aspects/Model/Repository/IRepositoryContracts.cs index 3391ff8..f43021b 100644 --- a/Aspects/Model/Repository/IRepositoryContracts.cs +++ b/Aspects/Model/Repository/IRepositoryContracts.cs @@ -124,6 +124,11 @@ public IQueryable DetachedEntities() where T : BaseDomainEntity throw new NotImplementedException(); } + public IQueryable DetachedValues() where T : BaseDomainValue + { + throw new NotImplementedException(); + } + public IRepository CommitChanges() { throw new NotImplementedException(); diff --git a/Aspects/NuGet/PublishAspects.cmd b/Aspects/NuGet/PublishAspects.cmd index dde856f..852febd 100644 --- a/Aspects/NuGet/PublishAspects.cmd +++ b/Aspects/NuGet/PublishAspects.cmd @@ -17,7 +17,7 @@ NuGet Pack NuGet\vm.Aspects.nuspec -symbols -Prop Configuration=Release if errorlevel 1 goto exit @echo Press any key to push to NuGet... > con: @pause > nul: -NuGet Push vm.Aspects.1.0.42-beta.nupkg +NuGet Push vm.Aspects.1.0.43-beta.nupkg :exit popd pause \ No newline at end of file diff --git a/Aspects/NuGet/vm.Aspects.nuspec b/Aspects/NuGet/vm.Aspects.nuspec index 0ced7ed..1f8a859 100644 --- a/Aspects/NuGet/vm.Aspects.nuspec +++ b/Aspects/NuGet/vm.Aspects.nuspec @@ -2,7 +2,7 @@ vm.Aspects - 1.0.42-beta + 1.0.43-beta Val Melamed Val Melamed @@ -12,7 +12,8 @@ A set of classes, utilities, etc. addressing various common cross-cutting concerns or extending existing similar libraries like Enterprise Library, Unity, etc. - * Added IRepository.Values<T>(). + * Added IRepository.Values<T>() and + * IRepository.DetachedValues<T>(). https://github.com/vmelamed/vm/blob/master/LICENSE https://github.com/vmelamed/vm/tree/master/Aspects diff --git a/Aspects/Parsers/Properties/AssemblyInfo.cs b/Aspects/Parsers/Properties/AssemblyInfo.cs index 09f9fcb..da80a7b 100644 --- a/Aspects/Parsers/Properties/AssemblyInfo.cs +++ b/Aspects/Parsers/Properties/AssemblyInfo.cs @@ -6,9 +6,9 @@ [assembly: AssemblyTitle("vm.Aspects.Parser")] [assembly: AssemblyDescription("Text parsing readers, e.g. CSV/TSV reader.")] -[assembly: AssemblyVersion("1.0.42")] -[assembly: AssemblyFileVersion("1.0.42")] -[assembly: AssemblyInformationalVersion("1.0.42")] +[assembly: AssemblyVersion("1.0.43")] +[assembly: AssemblyFileVersion("1.0.43")] +[assembly: AssemblyInformationalVersion("1.0.43")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo( "vm.Aspects.Parsers.Tests, " + diff --git a/Aspects/Properties/AssemblyInfo.cs b/Aspects/Properties/AssemblyInfo.cs index 19ffdaf..8210de9 100644 --- a/Aspects/Properties/AssemblyInfo.cs +++ b/Aspects/Properties/AssemblyInfo.cs @@ -2,9 +2,9 @@ [assembly: AssemblyTitle("vm.Aspects")] [assembly: AssemblyDescription("A set of classes addressing various common cross-cutting concerns.")] -[assembly: AssemblyVersion("1.0.42")] -[assembly: AssemblyFileVersion("1.0.42")] -[assembly: AssemblyInformationalVersion("1.0.42")] +[assembly: AssemblyVersion("1.0.43")] +[assembly: AssemblyFileVersion("1.0.43")] +[assembly: AssemblyInformationalVersion("1.0.43")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo( "vm.Aspects.Test, " + diff --git a/Aspects/Wcf/Properties/AssemblyInfo.cs b/Aspects/Wcf/Properties/AssemblyInfo.cs index 0f685f1..f436284 100644 --- a/Aspects/Wcf/Properties/AssemblyInfo.cs +++ b/Aspects/Wcf/Properties/AssemblyInfo.cs @@ -3,9 +3,9 @@ [assembly: AssemblyTitle("Wcf")] [assembly: AssemblyDescription("A set of classes and generics simplifying the initial configuration work of creating WCF services.")] -[assembly: AssemblyVersion("1.0.42")] -[assembly: AssemblyFileVersion("1.0.42")] -[assembly: AssemblyInformationalVersion("1.0.42")] +[assembly: AssemblyVersion("1.0.43")] +[assembly: AssemblyFileVersion("1.0.43")] +[assembly: AssemblyInformationalVersion("1.0.43")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo( "vm.Aspects.Wcf.Test, " +