├── CodexMicroORM.Core
├── Thumbs.db
├── xSkrape.ico
├── xSkrapeIcon.jpg
├── Properties
│ └── PublishProfiles
│ │ └── FolderProfile.pubxml
├── GlobalSuppressions.cs
├── ObjectServices
│ ├── Infrastructure
│ │ ├── ValidationWrapper.cs
│ │ ├── DynamicWithValuesBagErrors.cs
│ │ ├── DynamicWithAll.cs
│ │ ├── FieldWrapper.cs
│ │ └── ConnectionScope.cs
│ ├── Audit.cs
│ └── TypeChildRelationship.cs
├── CodexMicroORM.Core.csproj
├── Base
│ ├── BaseModel.cs
│ ├── ServiceScope.TrackedObject.cs
│ ├── Enums.cs
│ ├── Exceptions.cs
│ ├── Attributes.cs
│ ├── AttributeInitializer.cs
│ └── Settings.cs
├── DatabaseProviders
│ └── MSSQL
│ │ └── MSSQLConnection.cs
├── Pooling.cs
└── ListServices
│ └── Infrastructure
│ └── InMemIndexes.cs
├── CodexMicroORM.BindingSupport
├── xSkrape.ico
├── CodexMicroORM.BindingSupport.nuspec
├── Properties
│ └── AssemblyInfo.cs
├── Extensions.cs
├── CodexMicroORM.BindingSupport.csproj
└── Collections.cs
├── BaseTests
├── GlobalSuppressions.cs
├── CodexMicroORM.BaseTests.csproj
├── SandboxTests.cs
├── POCO.cs
├── DBExtensions.CodeGen.cs
├── Wrappers.CodeGen.cs
└── Modern12.cs
├── CodexMicroORM.CodexV1CompatLayer
└── CodexMicroORM.CodexV1CompatLayer
│ ├── GlobalSuppressions.cs
│ ├── Stubs.cs
│ ├── CodexMicroORM.CodexV1CompatLayer.csproj
│ ├── GenericSet.cs
│ ├── Extensions.cs
│ └── ParallelWorkload.cs
├── CodexMicroORM.SQLServer
├── CodexMicroORM.SQLServer.csproj
└── DataAccess
│ └── MSSQLConnection.cs
├── .gitattributes
├── .github
└── workflows
│ └── codeql-analysis.yml
├── .gitignore
├── CodexMicroORM.sln
└── LICENSE
/CodexMicroORM.Core/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codexguy/CodexMicroORM/HEAD/CodexMicroORM.Core/Thumbs.db
--------------------------------------------------------------------------------
/CodexMicroORM.Core/xSkrape.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codexguy/CodexMicroORM/HEAD/CodexMicroORM.Core/xSkrape.ico
--------------------------------------------------------------------------------
/CodexMicroORM.Core/xSkrapeIcon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codexguy/CodexMicroORM/HEAD/CodexMicroORM.Core/xSkrapeIcon.jpg
--------------------------------------------------------------------------------
/CodexMicroORM.BindingSupport/xSkrape.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codexguy/CodexMicroORM/HEAD/CodexMicroORM.BindingSupport/xSkrape.ico
--------------------------------------------------------------------------------
/BaseTests/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | // This file is used by Code Analysis to maintain SuppressMessage
2 | // attributes that are applied to this project.
3 | // Project-level suppressions either have no target or are given
4 | // a specific target and scoped to a namespace, type, member, etc.
5 |
6 | using System.Diagnostics.CodeAnalysis;
7 |
8 | [assembly: SuppressMessage("Usage", "CA2235:Mark all non-serializable fields", Justification = "Accepted", Scope = "module")]
9 |
--------------------------------------------------------------------------------
/CodexMicroORM.Core/Properties/PublishProfiles/FolderProfile.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | FileSystem
8 | Release
9 | Any CPU
10 | netstandard2.1
11 | bin\Release\netstandard2.1\publish\
12 |
13 |
--------------------------------------------------------------------------------
/CodexMicroORM.CodexV1CompatLayer/CodexMicroORM.CodexV1CompatLayer/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | // This file is used by Code Analysis to maintain SuppressMessage
2 | // attributes that are applied to this project.
3 | // Project-level suppressions either have no target or are given
4 | // a specific target and scoped to a namespace, type, member, etc.
5 |
6 | using System.Diagnostics.CodeAnalysis;
7 |
8 | [assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Code checked", Scope = "module")]
9 | [assembly: SuppressMessage("Usage", "CA2235:Mark all non-serializable fields", Justification = "Checked", Scope = "module")]
10 |
--------------------------------------------------------------------------------
/CodexMicroORM.Core/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | // This file is used by Code Analysis to maintain SuppressMessage
2 | // attributes that are applied to this project.
3 | // Project-level suppressions either have no target or are given
4 | // a specific target and scoped to a namespace, type, member, etc.
5 |
6 | using System.Diagnostics.CodeAnalysis;
7 |
8 | [assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Code checked", Scope = "module")]
9 | [assembly: SuppressMessage("Usage", "CA2235:Mark all non-serializable fields", Justification = "Behavior Checked", Scope = "module")]
10 | [assembly: SuppressMessage("Design", "CA1034:Nested types should not be visible", Justification = "Design Choice", Scope = "module")]
11 |
--------------------------------------------------------------------------------
/CodexMicroORM.BindingSupport/CodexMicroORM.BindingSupport.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | CodexMicroORM.BindingSupport
5 | 0.9.0
6 | CodexMicroORM UI Binding Support
7 | CodeX Enterprises LLC
8 | CodeX Enterprises LLC
9 | http://www.apache.org/licenses/LICENSE-2.0
10 | https://github.com/codexguy/CodexMicroORM
11 | http://www.xskrape.com/images/cef64.png
12 | true
13 | An alternative to ORM's such as Entity Framework, offers light-weight database mapping to your existing CLR objects with minimal effort. BindingSupport is net461, supporting two-way data-binding with entities.
14 | Visit on GitHub for details.
15 | Copyright (c) 2019, All Rights Reserved
16 | ORM microORM entity-framework database object-mapping micro-ORM entity data-access dataset linq-to-sql data-binding wpf
17 |
18 |
19 |
--------------------------------------------------------------------------------
/CodexMicroORM.BindingSupport/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("CodexMicroORM.BindingSupport")]
9 | [assembly: AssemblyDescription("Provides data binding services for UI's for CodexMicroORM")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("CodeX Enterprises LLC")]
12 | [assembly: AssemblyProduct("CodexMicroORM.BindingSupport")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("9698510f-6393-43a8-9d71-504fac6a5332")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("0.9.0.0")]
36 | [assembly: AssemblyFileVersion("0.9.0.0")]
37 |
--------------------------------------------------------------------------------
/BaseTests/CodexMicroORM.BaseTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net9.0
5 |
6 | false
7 |
8 |
9 |
10 | 1701;1702;IDE0008;IDE0058;IDE0047;IDE0060;VSSpell001
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | PreserveNewest
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | all
29 | runtime; build; native; contentfiles; analyzers; buildtransitive
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | PreserveNewest
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/CodexMicroORM.Core/ObjectServices/Infrastructure/ValidationWrapper.cs:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | Copyright 2024 CodeX Enterprises LLC
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | Major Changes:
17 | 02/2018 0.2.4 Initial release (Joel Champagne)
18 | ***********************************************************************/
19 | #nullable enable
20 | using System.ComponentModel;
21 |
22 | namespace CodexMicroORM.Core.Services
23 | {
24 | public class ValidationWrapper
25 | {
26 | private readonly IDataErrorInfo? _source;
27 | private readonly IDataErrorInfo? _iwsource;
28 |
29 | internal ValidationWrapper(ICEFInfraWrapper iw)
30 | {
31 | // If contained object implements IDataErrorInfo, support that "first"
32 | _source = iw.GetWrappedObject() as IDataErrorInfo;
33 | _iwsource = iw as IDataErrorInfo;
34 | }
35 |
36 | public bool IsValid => string.IsNullOrEmpty(_source?.Error) && string.IsNullOrEmpty(_iwsource?.Error);
37 |
38 | public bool IsPropertyValid(string propName) => string.IsNullOrEmpty(_source?[propName]) && string.IsNullOrEmpty(_iwsource?[propName]);
39 |
40 | public string? Error => _source?.Error ?? _iwsource?.Error;
41 |
42 | public string? PropertyError(string propName) => _source?[propName] ?? _iwsource?[propName];
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/CodexMicroORM.CodexV1CompatLayer/CodexMicroORM.CodexV1CompatLayer/Stubs.cs:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | Copyright 2024 CodeX Enterprises LLC
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | Major Changes:
17 | 06/2018 0.7 Initial release (Joel Champagne)
18 | ***********************************************************************/
19 | #nullable enable
20 | using System;
21 | using System.Collections.Generic;
22 | using System.Text;
23 |
24 | namespace CodeXFramework.BaseEntity
25 | {
26 | ///
27 | /// This class allows use of new EntityDataScope in legacy code but it performs NO ACTIONS. This is all covered now by service and connection scopes, it's encouraged that you change EntityDataScope references - but this at least lets code break less.
28 | ///
29 | public class EntityDataScope : IDisposable
30 | {
31 |
32 | #region IDisposable Support
33 | private bool disposedValue = false; // To detect redundant calls
34 |
35 | protected virtual void Dispose(bool disposing)
36 | {
37 | if (!disposedValue)
38 | {
39 | disposedValue = true;
40 | }
41 | }
42 |
43 | // This code added to correctly implement the disposable pattern.
44 | public void Dispose()
45 | {
46 | Dispose(true);
47 | }
48 | #endregion
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/CodexMicroORM.Core/ObjectServices/Infrastructure/DynamicWithValuesBagErrors.cs:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | Copyright 2024 CodeX Enterprises LLC
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | Major Changes:
17 | 02/2018 0.2.4 Initial release (Joel Champagne)
18 | ***********************************************************************/
19 | #nullable enable
20 | using System;
21 | using System.Collections.Generic;
22 | using System.ComponentModel;
23 |
24 | namespace CodexMicroORM.Core.Services
25 | {
26 | public class DynamicWithValuesBagErrors : DynamicWithValuesAndBag, IDataErrorInfo
27 | {
28 | string IDataErrorInfo.this[string columnName]
29 | {
30 | get
31 | {
32 | return CEF.CurrentValidationService(this).GetPropertyMessages(this, columnName).AsString().message;
33 | }
34 | }
35 |
36 | string IDataErrorInfo.Error
37 | {
38 | get
39 | {
40 | return CEF.CurrentValidationService(this).GetObjectMessage(this).AsString().message;
41 | }
42 | }
43 |
44 | internal DynamicWithValuesBagErrors(object o, ObjectState irs, IDictionary? props, IDictionary? types) : base(o, irs, props, types)
45 | {
46 | }
47 |
48 | public override WrappingSupport SupportsWrapping()
49 | {
50 | return WrappingSupport.OriginalValues | WrappingSupport.PropertyBag | WrappingSupport.DataErrors;
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/CodexMicroORM.CodexV1CompatLayer/CodexMicroORM.CodexV1CompatLayer/CodexMicroORM.CodexV1CompatLayer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0;net462;net8.0;net9.0
5 | 1.2.0
6 | true
7 | CodeX Enterprises LLC
8 | CodeX Enterprises LLC
9 |
10 | Copyright (c) 2024, All Rights Reserved
11 | true
12 |
13 | See: https://github.com/codexguy/CodexMicroORM
14 | For users of CodexFramework V1.0, this package offers a way to change less code when migrating to use CodexMicroORM as a replacement framework.
15 | https://github.com/codexguy/CodexMicroORM
16 | ORM microORM entity-framework database object-mapping micro-ORM entity data-access dataset linq-to-sql
17 | 1.2.0.0
18 | Apache-2.0
19 | xSkrapeIcon.jpg
20 | latest
21 | 1.2.0.0
22 |
23 |
24 |
25 | 1701;1702;IDE0008;IDE0058;IDE0047;IDE0060;VSSpell001
26 |
27 |
28 | 1701;1702;IDE0008;IDE0058;IDE0047;IDE0060;VSSpell001
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | True
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/CodexMicroORM.SQLServer/CodexMicroORM.SQLServer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0;net462;net8.0;net9.0
5 | latest
6 | True
7 | 1.2.0
8 | CodeX Enterprises LLC
9 | CodeX Enterprises LLC
10 | The database provider code to implement support for Microsoft SQL Server using the CodexMicroORM application framework.
11 | Copyright (c) 2024, All Rights Reserved
12 | https://github.com/codexguy/CodexMicroORM
13 | xSkrapeIcon.jpg
14 | ORM microORM entity-framework database object-mapping micro-ORM entity data-access dataset linq-to-sql
15 | See: https://github.com/codexguy/CodexMicroORM
16 | Apache-2.0
17 | True
18 |
19 |
20 |
21 | 1701;1702;IDE0008;IDE0058;IDE0047;IDE0060;VSSpell001
22 |
23 |
24 | 1701;1702;IDE0008;IDE0058;IDE0047;IDE0060;VSSpell001
25 |
26 |
27 |
28 |
29 | True
30 | \
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/CodexMicroORM.Core/ObjectServices/Infrastructure/DynamicWithAll.cs:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | Copyright 2024 CodeX Enterprises LLC
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | Major Changes:
17 | 12/2017 0.2 Initial release (Joel Champagne)
18 | ***********************************************************************/
19 | #nullable enable
20 | using System;
21 | using System.Collections.Generic;
22 | using System.ComponentModel;
23 | using System.Data;
24 |
25 | namespace CodexMicroORM.Core.Services
26 | {
27 | ///
28 | /// A fully featured wrapper that implements INotifyPropertyChanged, providing change notifications for updates on CLR properties as well as dynamic prop bag properties.
29 | ///
30 | public sealed class DynamicWithAll : DynamicWithValuesBagErrors, INotifyPropertyChanged
31 | {
32 | internal DynamicWithAll(object o, ObjectState irs, IDictionary? props, IDictionary? types) : base(o, irs, props, types)
33 | {
34 | }
35 |
36 | protected override void OnPropertyChanged(string propName, object? oldVal, object? newVal, bool isBag)
37 | {
38 | base.OnPropertyChanged(propName, oldVal, newVal, isBag);
39 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));
40 | }
41 |
42 | public override WrappingSupport SupportsWrapping()
43 | {
44 | return WrappingSupport.OriginalValues | WrappingSupport.PropertyBag | WrappingSupport.Notifications | WrappingSupport.DataErrors;
45 | }
46 |
47 | public event PropertyChangedEventHandler? PropertyChanged;
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/CodexMicroORM.CodexV1CompatLayer/CodexMicroORM.CodexV1CompatLayer/GenericSet.cs:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | Copyright 2024 CodeX Enterprises LLC
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | Major Changes:
17 | 06/2018 0.7 Initial release (Joel Champagne)
18 | ***********************************************************************/
19 | #nullable enable
20 | using CodexMicroORM.Core;
21 | using CodexMicroORM.Core.Services;
22 | using System;
23 | using System.Linq;
24 |
25 | namespace CodeXFramework.BaseEntity
26 | {
27 | public class GenericSet : EntitySet
28 | {
29 | public int RetrieveByQuery(string procName, params object?[] args)
30 | {
31 | this.DBRetrieveByQuery(procName, args);
32 | return this.Count;
33 | }
34 |
35 | public T GetItem(int rowNum, string fieldName)
36 | {
37 | if (rowNum >= this.Count)
38 | {
39 | throw new ArgumentOutOfRangeException("rowNum is larger than the colleciton size.");
40 | }
41 |
42 | var row = this.Skip(rowNum).FirstOrDefault();
43 |
44 | if (row == null)
45 | {
46 | throw new InvalidOperationException("Could not find row.");
47 | }
48 |
49 | var iw = row.AsInfraWrapped();
50 |
51 | if (iw == null)
52 | {
53 | throw new InvalidOperationException("Could not find wrapped row.");
54 | }
55 |
56 | if (Nullable.GetUnderlyingType(typeof(T)) != null)
57 | {
58 | return (T)Activator.CreateInstance(typeof(T), iw.GetValue(fieldName))!;
59 | }
60 | else
61 | {
62 | return (T)Convert.ChangeType(iw.GetValue(fieldName), typeof(T))!;
63 | }
64 | }
65 | }
66 |
67 | public class GenericSetRow
68 | {
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/CodexMicroORM.BindingSupport/Extensions.cs:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | Copyright 2018 CodeX Enterprises LLC
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | Major Changes:
17 | 12/2017 0.2 Initial release (Joel Champagne)
18 | ***********************************************************************/
19 | using System;
20 | using System.Collections.Generic;
21 | using System.Linq;
22 | using CodexMicroORM.Core;
23 | using CodexMicroORM.Core.Services;
24 |
25 | namespace CodexMicroORM.BindingSupport
26 | {
27 | public static class Extensions
28 | {
29 | public static GenericBindableSet AsDynamicBindable(this IEnumerable list) where T : ICEFInfraWrapper, new()
30 | {
31 | return new GenericBindableSet(from a in list let d = a.AsInfraWrapped() as DynamicWithBag where d != null select new DynamicBindable(d))
32 | {
33 | BaseItemType = typeof(T)
34 | };
35 | }
36 |
37 | public static GenericBindableSet AsDynamicBindable(this System.Collections.IEnumerable list)
38 | {
39 | return new GenericBindableSet(from a in list.Cast