Claims { get; set; }
43 |
44 | #endregion
45 |
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/Application.Core/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("Application.Core")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Application.Core")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("0c6b85fc-4d93-421f-9c71-2d94b0151c80")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Domain.Core.Tests/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("Domain.Core.Tests")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Domain.Core.Tests")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("870e0e74-6bd8-4b16-aaf7-c4b65981087c")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client/Views/Manage/ChangePassword.cshtml:
--------------------------------------------------------------------------------
1 | @model ASP.NET.MVC5.Client.Models.ChangePasswordViewModel
2 | @{
3 | ViewBag.Title = "Change Password";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("ChangePassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 | Change Password Form
12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" })
14 |
20 |
26 |
32 |
37 | }
38 | @section Scripts {
39 | @Scripts.Render("~/bundles/jqueryval")
40 | }
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client/App_Start/BundleConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web;
2 | using System.Web.Optimization;
3 |
4 | namespace ASP.NET.MVC5.Client
5 | {
6 | public class BundleConfig
7 | {
8 | // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
9 | public static void RegisterBundles(BundleCollection bundles)
10 | {
11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
12 | "~/Scripts/jquery-{version}.js"));
13 |
14 | bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
15 | "~/Scripts/jquery.validate*"));
16 |
17 | // Use the development version of Modernizr to develop with and learn from. Then, when you're
18 | // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
19 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
20 | "~/Scripts/modernizr-*"));
21 |
22 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
23 | "~/Scripts/bootstrap.js",
24 | "~/Scripts/respond.js"));
25 |
26 | bundles.Add(new StyleBundle("~/Content/css").Include(
27 | "~/Content/bootstrap.css",
28 | "~/Content/site.css"));
29 |
30 | // Set EnableOptimizations to false for debugging. For more information,
31 | // visit http://go.microsoft.com/fwlink/?LinkId=301862
32 | BundleTable.EnableOptimizations = true;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Domain.BoundedContext/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("Domain.BoundedContext")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Domain.BoundedContext")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("0d9c5d60-be8f-4141-bdfb-c31ec6debbf1")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Infrastructure.Data.Core/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("Infrastructure.Data.Core")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Infrastructure.Data.Core")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("83048572-4389-4350-a1c6-b9468d4eafa7")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Application.BoundedContext/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("Application.BoundedContext")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Application.BoundedContext")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("16a8010e-3805-4d5e-a108-66658fea57f4")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client/Views/Account/ResetPassword.cshtml:
--------------------------------------------------------------------------------
1 | @model ASP.NET.MVC5.Client.Models.ResetPasswordViewModel
2 | @{
3 | ViewBag.Title = "Reset password";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 | Reset your password.
12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" })
14 | @Html.HiddenFor(model => model.Code)
15 |
21 |
27 |
33 |
38 | }
39 |
40 | @section Scripts {
41 | @Scripts.Render("~/bundles/jqueryval")
42 | }
43 |
--------------------------------------------------------------------------------
/Application.BoundedContext.Tests/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("Application.BoundedContext.Tests")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Application.BoundedContext.Tests")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("507ad184-5ec1-443b-afd5-819982553b55")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Infrastructure.CrossCutting.IoC/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("Infrastructure.CrossCutting.IoC")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Infrastructure.CrossCutting.IoC")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("97a57f0c-2caa-4011-bc3c-be4ea94ba936")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Infrastructure.CrossCutting.Test/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("Infrastructure.CrossCutting.Test")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Infrastructure.CrossCutting.Test")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("57146cdc-740c-4101-9523-01f88b7e57e8")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Infrastructure.Data.BoundedContext/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("Infrastructure.Data.BoundedContext")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Infrastructure.Data.BoundedContext")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("7d8727d3-c74b-400b-8ea6-6ae380c15028")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Infrastructure.CrossCutting.SeedWork/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("Infrastructure.CrossCutting.SeedWork")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Infrastructure.CrossCutting.SeedWork")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("24d3c72f-72ca-4fed-b58f-ff5d5dd31e7c")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Infrastructure.CrossCutting.NetFramework/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("Infrastructure.CrossCutting.NetFramework")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Infrastructure.CrossCutting.NetFramework")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("004a6f37-4728-465f-b439-3361fea115bb")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Infrastructure.Data.BoundedContext.Test/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("Infrastructure.Data.BoundedContext.Test")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Infrastructure.Data.BoundedContext.Test")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("3881bb75-8aa3-4cb0-aae4-062878275ab1")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Infrastructure.Data.BoundedContext.Tests/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("Infrastructure.Data.BoundedContext.Tests")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("General Electric")]
12 | [assembly: AssemblyProduct("Infrastructure.Data.BoundedContext.Tests")]
13 | [assembly: AssemblyCopyright("Copyright © General Electric 2015")]
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("45351e54-6528-493e-b0d8-27c7d7bea1ed")]
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("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Domain.BoundedContext/ERPModule/Employee/Employee.cs:
--------------------------------------------------------------------------------
1 | namespace Domain.BoundedContext.ERPModule
2 | {
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel.DataAnnotations;
6 | using Domain.Core;
7 | using System.ComponentModel.DataAnnotations.Schema;
8 | using Domain.BoundedContext.Resources;
9 |
10 | ///
11 | /// Aggregate root for Employee Aggregate.
12 | ///
13 | [Table("Employees")]
14 | public class Employee
15 | : Person
16 | {
17 |
18 | #region Properties
19 |
20 | ///
21 | /// Get or set the Date of Creation
22 | ///
23 | [DataType(DataType.DateTime)]
24 | public DateTime HireDate { get; set; }
25 |
26 | ///
27 | /// Get or set the Postion identifier
28 | ///
29 | public Guid PostionId { get; set; }
30 |
31 | ///
32 | /// Get or set the Postion
33 | ///
34 | [Required(ErrorMessageResourceName = "PositionRequired",ErrorMessageResourceType=typeof (Messages))]
35 | [ForeignKey("PostionId")]
36 | public Position Postion { get; set; }
37 |
38 | ///
39 | /// Get or set associated Department identifier
40 | ///
41 | public Guid DepartmentId { get; set; }
42 |
43 | ///
44 | /// Get the current Department for this employee
45 | ///
46 | [ForeignKey("DepartmentId")]
47 | public virtual Department Department { get; set; }
48 |
49 | #endregion
50 |
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Infrastructure.CrossCutting.IoC/IoCFactory.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Infrastructure.CrossCutting.IoC
3 | {
4 | using System;
5 | using System.Collections.Generic;
6 | using Infrastructure.CrossCutting.Core;
7 | using Infrastructure.CrossCutting.IoC.Unity;
8 |
9 | ///
10 | /// IoCFactory implementation
11 | ///
12 | public sealed class IoCFactory
13 | {
14 | #region Singleton
15 |
16 | static readonly IoCFactory instance = new IoCFactory();
17 |
18 | ///
19 | /// Get singleton instance of IoCFactory
20 | ///
21 | public static IoCFactory Instance
22 | {
23 | get
24 | {
25 | return instance;
26 | }
27 | }
28 |
29 | #endregion
30 |
31 | #region Members
32 |
33 | IContainer _CurrentContainer;
34 |
35 | ///
36 | /// Get current configured IContainer
37 | ///
38 | /// At this moment only IoCUnityContainer existss
39 | ///
40 | ///
41 | public IContainer CurrentContainer
42 | {
43 | get
44 | {
45 | return _CurrentContainer;
46 | }
47 | }
48 |
49 | #endregion
50 |
51 | #region Constructor
52 |
53 | ///
54 | /// Only for singleton pattern, remove before field init IL anotation
55 | ///
56 | static IoCFactory() { }
57 | IoCFactory()
58 | {
59 | _CurrentContainer = new IoCUnityContainer();
60 | }
61 |
62 | #endregion
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client/Views/Shared/_Layout.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | @ViewBag.Title - PolyGlot Persistence Demo
7 | @Styles.Render("~/Content/css")
8 | @Scripts.Render("~/bundles/modernizr")
9 |
10 |
11 |
12 |
13 |
14 |
21 |
22 |
23 | @Html.ActionLink("Home", "Index", "Home")
24 | @*@Html.ActionLink("About", "About", "Home")
25 | @Html.ActionLink("Contact", "Contact", "Home") *@
26 |
27 | @Html.Partial("_LoginPartial")
28 |
29 |
30 |
31 |
32 | @RenderBody()
33 |
34 |
37 |
38 |
39 | @Scripts.Render("~/bundles/jquery")
40 | @Scripts.Render("~/bundles/bootstrap")
41 | @RenderSection("scripts", required: false)
42 |
43 |
44 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client.Cloud.Azure/ASP.NET.MVC5.Client.CloudContent/diagnostics.wadcfg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client/Views/Facility/Create.cshtml:
--------------------------------------------------------------------------------
1 | @model ASP.NET.MVC5.Client.Models.FacilityCreateViewModel
2 | @{
3 | ViewBag.Title = "Create";
4 | }
5 |
6 | Create facility
7 |
8 |
9 |
10 | @using (Html.BeginForm("Create", "Facility", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
15 | @Html.ValidationSummary("", new { @class = "text-danger" })
16 |
22 |
28 |
34 |
40 |
45 | }
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client/Models/EquipmentViewModels.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel.DataAnnotations;
4 | using System.Linq;
5 | using System.Web;
6 | using System.Web.Mvc;
7 |
8 | namespace ASP.NET.MVC5.Client.Models
9 | {
10 | public class EquipmentViewModels
11 | {
12 | }
13 | public class EquipmentItemViewModel
14 | {
15 | public string Id { get; set; }
16 | public string DepartmentName { get; set; }
17 | public string Name { get; set; }
18 | public string EquipmentModel { get; set; }
19 | public string CreationDate { get; set; }
20 | public string Description { get; set; }
21 | }
22 |
23 |
24 | public class EquipmentListViewModel
25 | {
26 | public int Total { get; set; }
27 | public IEnumerable Equipment { get; set; }
28 | }
29 |
30 | public class EquipmentCreateViewModel
31 | {
32 |
33 | public string Id { get; set; }
34 |
35 | [Required]
36 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
37 | [Display(Name = "Equipment Name")]
38 | public string Name { get; set; }
39 |
40 | [Required]
41 | [Display(Name = "Model")]
42 | public string EquipmentModel { get; set; }
43 |
44 | [Required]
45 | [Display(Name = "Department Name")]
46 | public string DepartmentId { get; set; }
47 | public IEnumerable FacilitiesModel { get; set; }
48 |
49 | [Required]
50 | [Display(Name = "Description")]
51 | public string Description { get; set; }
52 | }
53 |
54 |
55 |
56 | }
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client/Models/AspnetIdentity/ApplicationUser.cs:
--------------------------------------------------------------------------------
1 | using Application.BoundedContext.MembershipModule;
2 | using Domain.Core;
3 | using Microsoft.AspNet.Identity;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Security.Claims;
8 | using System.Threading.Tasks;
9 | using System.Web;
10 |
11 | namespace ASP.NET.MVC5.Client.Models
12 | {
13 | public class ApplicationUser : IUser
14 | {
15 | public string Id { get; set; }
16 |
17 | public string UserName { get; set; }
18 |
19 | public string Email { get; set; }
20 |
21 | public string PasswordHash { get; set; }
22 |
23 | public string PhoneNumber { get; set; }
24 |
25 | public string SecurityStamp { get; set; }
26 |
27 | public bool LockoutEnabled { get; set; }
28 |
29 | public int AccessFailedCount { get; set; }
30 |
31 | public bool TwoFactorEnabled { get; set; }
32 |
33 | public DateTime? LockoutEndDateUtc { get; set; }
34 |
35 | public bool EmailConfirmed { get; set; }
36 |
37 | public bool PhoneNumberConfirmed { get; set; }
38 |
39 |
40 | public ApplicationUser()
41 | {
42 | this.Id = IdentityGenerator.SequentialGuid().ToString();
43 | }
44 | public async Task GenerateUserIdentityAsync(ApplicationUserManager manager)
45 | {
46 | // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
47 | var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
48 | // Add custom user claims here
49 | return userIdentity;
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/Infrastructure.Data.Core/InMemorySet/InMemoryDbAsyncEnumerable.cs:
--------------------------------------------------------------------------------
1 | // Decompiled with JetBrains decompiler
2 | // Type: Pedago.Infrastructure.Data.Core.InMemoryDbAsyncEnumerable`1
3 | // Assembly: Infrastructure.Data.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
4 | // MVID: 63C97C68-8138-419C-94E3-46CB97551F41
5 | // Assembly location: C:\Pedago\Solution1\ASP.NET.MVC5.Client\bin\Infrastructure.Data.Core.dll
6 |
7 | using System.Collections;
8 | using System.Collections.Generic;
9 | using System.Data.Entity.Infrastructure;
10 | using System.Linq;
11 | using System.Linq.Expressions;
12 |
13 | namespace Infrastructure.Data.Core
14 | {
15 | public class InMemoryDbAsyncEnumerable : EnumerableQuery, IDbAsyncEnumerable, IDbAsyncEnumerable, IQueryable, IEnumerable, IQueryable, IEnumerable
16 | {
17 | IQueryProvider IQueryable.Provider
18 | {
19 | get
20 | {
21 | return (IQueryProvider)new InMemoryDbAsyncQueryProvider((IQueryProvider)this);
22 | }
23 | }
24 |
25 | public InMemoryDbAsyncEnumerable(IEnumerable enumerable)
26 | : base(enumerable)
27 | {
28 | }
29 |
30 | public InMemoryDbAsyncEnumerable(Expression expression)
31 | : base(expression)
32 | {
33 | }
34 |
35 | public IDbAsyncEnumerator GetAsyncEnumerator()
36 | {
37 | return (IDbAsyncEnumerator)new InMemoryDbAsyncEnumerator(Enumerable.AsEnumerable((IEnumerable)this).GetEnumerator());
38 | }
39 |
40 | IDbAsyncEnumerator IDbAsyncEnumerable.GetAsyncEnumerator()
41 | {
42 | return (IDbAsyncEnumerator)this.GetAsyncEnumerator();
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Infrastructure.Data.Core/InMemorySet/InMemoryDbAsyncQueryProvider.cs:
--------------------------------------------------------------------------------
1 | namespace Infrastructure.Data.Core
2 | {
3 | using System.Data.Entity.Infrastructure;
4 | using System.Linq;
5 | using System.Linq.Expressions;
6 | using System.Threading;
7 | using System.Threading.Tasks;
8 | public class InMemoryDbAsyncQueryProvider : IDbAsyncQueryProvider, IQueryProvider
9 | {
10 | private readonly IQueryProvider _inner;
11 |
12 | internal InMemoryDbAsyncQueryProvider(IQueryProvider inner)
13 | {
14 | this._inner = inner;
15 | }
16 |
17 | public IQueryable CreateQuery(Expression expression)
18 | {
19 | return (IQueryable)new InMemoryDbAsyncEnumerable(expression);
20 | }
21 |
22 | public IQueryable CreateQuery(Expression expression)
23 | {
24 | return (IQueryable)new InMemoryDbAsyncEnumerable(expression);
25 | }
26 |
27 | public object Execute(Expression expression)
28 | {
29 | return this._inner.Execute(expression);
30 | }
31 |
32 | public TResult Execute(Expression expression)
33 | {
34 | return this._inner.Execute(expression);
35 | }
36 |
37 | public Task ExecuteAsync(Expression expression, CancellationToken cancellationToken)
38 | {
39 | return Task.FromResult(this.Execute(expression));
40 | }
41 |
42 | public Task ExecuteAsync(Expression expression, CancellationToken cancellationToken)
43 | {
44 | return Task.FromResult(this.Execute(expression));
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client/Views/Equipment/Create.cshtml:
--------------------------------------------------------------------------------
1 | @model ASP.NET.MVC5.Client.Models.EquipmentCreateViewModel
2 | @{
3 | ViewBag.Title = "Create";
4 | }
5 |
6 | Create equipment
7 |
8 |
9 |
10 | @using (Html.BeginForm("Create", "Equipment", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
15 | @Html.ValidationSummary("", new { @class = "text-danger" })
16 |
22 |
28 |
34 |
40 |
45 | }
--------------------------------------------------------------------------------
/Domain.BoundedContext/ERPModule/Department/Department.cs:
--------------------------------------------------------------------------------
1 | namespace Domain.BoundedContext.ERPModule
2 | {
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel.DataAnnotations;
6 | using Domain.Core;
7 | using System.ComponentModel.DataAnnotations.Schema;
8 | using Domain.BoundedContext.Resources;
9 |
10 | ///
11 | /// Aggregate root for Department Aggregate.
12 | ///
13 | [Table("Departments")]
14 | public class Department
15 | : EntityBase
16 | {
17 |
18 | #region Properties
19 |
20 | ///
21 | /// Get or set the Given name of this customer
22 | ///
23 | [Required(ErrorMessageResourceName = "DepartmentNameRequired", ErrorMessageResourceType = typeof(Messages))]
24 | [MaxLength(50, ErrorMessageResourceName = "DepartmentNameMaxLength", ErrorMessageResourceType = typeof(Messages))]
25 | public string Name { get; set; }
26 |
27 | ///
28 | /// Get or set associated Organization identifier
29 | ///
30 | public Guid OrganizationId { get; set; }
31 |
32 | ///
33 | /// Get the current Organization
34 | ///
35 | [ForeignKey("OrganizationId")]
36 | public virtual Organization Organization { get; set; }
37 |
38 | ///
39 | /// Get or set the Employees list
40 | ///
41 | public virtual ICollection Employees { get; set; }
42 |
43 | ///
44 | /// Get or set the Position list
45 | ///
46 | public virtual ICollection Positions { get; set; }
47 |
48 | #endregion
49 |
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client/Views/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client/App_Start/BootStrapper.cs:
--------------------------------------------------------------------------------
1 | using ASP.NET.MVC5.Client.Models;
2 | using Infrastructure.CrossCutting.Core;
3 | using Infrastructure.CrossCutting.IoC;
4 | using Microsoft.Owin.Security;
5 | using Pedago.ASP.NET.MVC5.Client.Extension;
6 | using System;
7 | using System.Collections.Generic;
8 | using System.Linq;
9 | using System.Reflection;
10 | using System.Web;
11 | using System.Web.Mvc;
12 |
13 |
14 | [assembly: PreApplicationStartMethod(typeof(ASP.NET.MVC5.Client.BootStrapper), "Start")]
15 |
16 | namespace ASP.NET.MVC5.Client
17 | {
18 | public static class BootStrapper
19 | {
20 | public static void Start()
21 | {
22 | IoCFactory.Instance.CurrentContainer.RegisterInstance();
23 | IoCFactory.Instance.CurrentContainer.RegisterType(typeof(ApplicationUserManager));
24 | IoCFactory.Instance.CurrentContainer.RegisterType(typeof(ApplicationSignInManager));
25 | IoCFactory.Instance.CurrentContainer.RegisterType(typeof(EmailManagementServices));
26 | IoCFactory.Instance.CurrentContainer.RegisterInstance(c => HttpContext.Current.GetOwinContext().Authentication);
27 | DependencyResolver.SetResolver((IDependencyResolver)new UnityWebResolver(IoCFactory.Instance.CurrentContainer));
28 | }
29 |
30 | public static void Stop()
31 | {
32 | }
33 |
34 | private static void RegisterControllers(IContainer _currentContainer)
35 | {
36 | IEnumerable controllerTypes = Assembly.GetExecutingAssembly().GetExportedTypes().Where(x => typeof(IController).IsAssignableFrom(x));
37 | foreach (Type type in controllerTypes)
38 | {
39 | _currentContainer.RegisterType(type);
40 | }
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/Infrastructure.CrossCutting.SeedWork/Logging/ILogger.cs:
--------------------------------------------------------------------------------
1 | namespace Infrastructure.CrossCutting.Core
2 | {
3 | ///
4 | /// Trace manager contract for trace instrumentation
5 | ///
6 | public interface ILogger
7 | {
8 | ///
9 | /// Start logical operation in trace repository
10 | ///
11 | ///
12 | void TraceStartLogicalOperation(string operationName);
13 |
14 | ///
15 | /// Stop actual logical operation in trace repository
16 | ///
17 | void TraceStopLogicalOperation();
18 |
19 | ///
20 | /// Send "start" flag to trace repository
21 | ///
22 | void TraceStart();
23 |
24 | ///
25 | /// Send "stop" flag to trace repository
26 | ///
27 | void TraceStop();
28 |
29 | ///
30 | /// Trace information message to trace repository
31 | /// Information message to trace
32 | ///
33 | void TraceInfo(string message);
34 |
35 | ///
36 | /// Trace warning message to trace repository
37 | ///
38 | /// Warning message to trace
39 | void TraceWarning(string message);
40 |
41 | ///
42 | /// Trace error message to trace repository
43 | ///
44 | /// Error message to trace
45 | void TraceError(string message);
46 |
47 | ///
48 | /// Trace critical message to trace repository
49 | ///
50 | /// Critical message to trace
51 | void TraceCritical(string message);
52 | }
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Application.BoundedContext/ERPModule/OrganizationManagementService.cs:
--------------------------------------------------------------------------------
1 | using Domain.BoundedContext.ERPModule;
2 | using Infrastructure.CrossCutting.Core;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading;
8 | using System.Threading.Tasks;
9 |
10 | namespace Application.BoundedConext.ERPModule
11 | {
12 | public class OrganizationManagementService : IOrganizationManagementService
13 | {
14 | private IOrganizationRepository _organizationRepository;
15 | private ILogger _logger;
16 |
17 | public OrganizationManagementService(IOrganizationRepository organizationRepository, ILogger logger)
18 | {
19 | if (organizationRepository == (IOrganizationRepository)null)
20 | throw new ArgumentNullException("organizationRepository");
21 | if (logger == (ILogger)null)
22 | throw new ArgumentNullException("logger");
23 | this._organizationRepository = organizationRepository;
24 | this._logger = logger;
25 | }
26 |
27 |
28 | public Task AddAsync(Organization organization, CancellationToken cancellationToken = default(CancellationToken))
29 | {
30 | cancellationToken.ThrowIfCancellationRequested();
31 | if (organization == (Organization)null)
32 | throw new ArgumentNullException("organization");
33 |
34 |
35 | this._organizationRepository.Add(organization);
36 | return this._organizationRepository.UnitOfWork.CommitAsync(cancellationToken);
37 | }
38 |
39 | public Task> GetAllFacilitiesAsync(CancellationToken cancellationToken = default(CancellationToken))
40 | {
41 | return Task.FromResult>(this._organizationRepository.GetAllElements());
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Domain.BoundedContext/ERPModule/Organization/Organization.cs:
--------------------------------------------------------------------------------
1 | namespace Domain.BoundedContext.ERPModule
2 | {
3 | using Domain.BoundedContext.Resources;
4 | using Domain.Core;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.ComponentModel.DataAnnotations;
8 | using System.ComponentModel.DataAnnotations.Schema;
9 |
10 | ///
11 | /// Aggregate root for Organization Aggregate.
12 | ///
13 | [Table("Organizations")]
14 | public class Organization
15 | : EntityBase
16 | {
17 |
18 | #region Properties
19 |
20 |
21 | ///
22 | /// Get or set the Given name of this customer
23 | ///
24 | [Required(ErrorMessageResourceName = "OrganizationNameRequired", ErrorMessageResourceType = typeof(Messages))]
25 | [MaxLength(50, ErrorMessageResourceName = "OrganizationNameMaxLength", ErrorMessageResourceType = typeof(Messages))]
26 | public string Name { get; set; }
27 |
28 | ///
29 | /// Get or set the Address identifier
30 | ///
31 | public Guid AddressId { get; set; }
32 |
33 | ///
34 | /// Get or set the address
35 | ///
36 | [ForeignKey("AddressId")]
37 | public virtual Address Address { get; set; }
38 |
39 | ///
40 | /// Get or set associated Customer identifier
41 | ///
42 | public Guid CustomerId { get; set; }
43 |
44 | ///
45 | /// Get the current Customer
46 | ///
47 | [ForeignKey("CustomerId")]
48 | public virtual Customer Customer { get; set; }
49 |
50 | ///
51 | /// Get or set the Departments list
52 | ///
53 | public virtual ICollection Departments { get; set; }
54 |
55 | #endregion
56 |
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/PolyGlotPersitence.Modeling/UMLClassDiagram2.classdiagram:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Home Page";
3 | }
4 |
5 |
6 |
PolyGlot Persistence Demo
7 |
Investigate on how the data access layer that can use several types of data-stores depending on the information, in a way that is transparent to the application
8 |
9 |
10 |
11 |
12 |
Facilities In SQL server data store
13 |
14 | in Facilities we store not huge amount of a data and it does not change frequentrly ,but we need security and normalized data
15 |
16 |
17 | @Html.ActionLink("View", "index", "Facility", null, new { @class = "btn btn-primary btn-lg " })
18 |
19 |
20 |
21 |
Equipemnt in Lucene data store
22 |
there is huge amount of data accessed in different mode read write update , search and stats (more selective and needs to filter records based on non-key fields)
23 |
24 | @Html.ActionLink("View", "index", "Equipment", null, new { @class = "btn btn-primary btn-lg " })
25 |
26 |
27 |
28 |
Departments in Mongo Data store
29 |
not huge amount of data the add/update opeartions are less frequent oposit of the read operations that are very frequents(more selective and needs to filter records based on non-key fields)
30 |
31 | @Html.ActionLink("View", "index", "Department",null, new { @class = "btn btn-primary btn-lg " })
32 |
33 |
34 |
35 |
Audit trial in azure table key value store
36 |
Huge amount of data used only for data manupulatin.opaque data items .
37 |
View »
38 |
39 |
40 |
--------------------------------------------------------------------------------
/Infrastructure.Data.Core/ISql.cs:
--------------------------------------------------------------------------------
1 | //===================================================================================
2 | //
3 | //===================================================================================
4 | //
5 | //
6 | //
7 | //===================================================================================
8 | //
9 | //
10 | //
11 | //===================================================================================
12 |
13 |
14 | namespace Infrastructure.Data.Core
15 | {
16 | using System;
17 | using System.Collections.Generic;
18 | using System.Linq;
19 | using System.Text;
20 |
21 |
22 | ///
23 | /// Base contract for support 'dialect specific queries'.
24 | ///
25 | public interface ISql
26 | {
27 | ///
28 | /// Execute specific query with underliying persistence store
29 | ///
30 | /// Entity type to map query results
31 | ///
32 | /// Dialect Query
33 | ///
34 | /// SELECT idCustomer,Name FROM dbo.[Customers] WHERE idCustomer > {0}
35 | ///
36 | ///
37 | /// A vector of parameters values
38 | ///
39 | /// Enumerable results
40 | ///
41 | IEnumerable ExecuteQuery(string sqlQuery, params object[] parameters);
42 |
43 | ///
44 | /// Execute arbitrary command into underliying persistence store
45 | ///
46 | ///
47 | /// Command to execute
48 | ///
49 | /// SELECT idCustomer,Name FROM dbo.[Customers] WHERE idCustomer > {0}
50 | ///
51 | ///
52 | /// A vector of parameters values
53 | /// The number of affected records
54 | int ExecuteCommand(string sqlCommand, params object[] parameters);
55 |
56 |
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client.Tests/CodedUITests/BrowserSelect/BrowserSelect.cs:
--------------------------------------------------------------------------------
1 | using OpenQA.Selenium;
2 | using OpenQA.Selenium.Chrome;
3 | using OpenQA.Selenium.Firefox;
4 | using OpenQA.Selenium.IE;
5 | using System;
6 | using System.Configuration;
7 | using System.IO;
8 | using System.Reflection;
9 |
10 | namespace ASP.NET.MVC5.Client.Tests.CodedUITests
11 | {
12 | public static class BrowserSelect
13 | {
14 | public static IWebDriver GetConfigBrowser(string browserName)
15 | {
16 | string AppRoot = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
17 | string strDriverPath = null;
18 | IWebDriver webDriver = null;
19 | if (browserName.Equals("Firefox", StringComparison.InvariantCultureIgnoreCase))
20 | {
21 | webDriver = new FirefoxDriver();
22 | }
23 | else if (browserName.Equals("chrome", StringComparison.InvariantCultureIgnoreCase))
24 | {
25 | strDriverPath = Path.Combine(AppRoot, @"CodedUITests\Drivers\chromedriver_win32");
26 | webDriver = new ChromeDriver(strDriverPath);
27 |
28 | }
29 | else if (browserName.Equals("IE", StringComparison.InvariantCultureIgnoreCase))
30 | {
31 | InternetExplorerOptions options = new InternetExplorerOptions()
32 | {
33 | EnableNativeEvents = true,
34 | IgnoreZoomLevel = true
35 | };
36 | strDriverPath = Path.Combine(AppRoot, @"CodedUITests\Drivers\IEDriverServer_Win32_2.44.0");
37 | webDriver = new InternetExplorerDriver(strDriverPath, options, TimeSpan.FromMinutes(3.0));
38 | }
39 | if (webDriver == null)
40 | throw new Exception("must configure browsername in aap.config");
41 | else
42 | return webDriver;
43 | }
44 |
45 | public static IWebDriver GetConfigBrowser()
46 | {
47 | return BrowserSelect.GetConfigBrowser(ConfigurationManager.AppSettings["browserName"]);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Application.BoundedContext/Blob/BlobManagementServices.cs:
--------------------------------------------------------------------------------
1 | namespace Application.BoundedConext.Blob
2 | {
3 | using System.Threading.Tasks;
4 | using Domain.BoundedContext.BlobAggregates;
5 | using Infrastructure.CrossCutting.Core;
6 | using System;
7 | using Infrastructure.Data.BoundedContext.UnitOfWork;
8 | using System.Collections.Generic;
9 |
10 | public class BlobManagementServices:IBlobManagementServices
11 | {
12 |
13 |
14 | #region Fields
15 | private IBlobAggregateRepository _blobRepository;
16 | private ILogger _logger;
17 | #endregion
18 |
19 | #region Ctor
20 | public BlobManagementServices(IBlobAggregateRepository blobRepository, ILogger logger)
21 | {
22 | if (blobRepository == (IBlobAggregateRepository)null)
23 | throw new ArgumentNullException("blobRepository");
24 | if (logger == (ILogger)null)
25 | throw new ArgumentNullException("logger");
26 | this._blobRepository = blobRepository;
27 | this._logger = logger;
28 | }
29 |
30 | #endregion
31 |
32 |
33 |
34 | #region IBlobManagementServices
35 |
36 | ///
37 | ///
38 | ///
39 | ///
40 | public Task UploadBlobAsync(BlobAggregate file)
41 | {
42 |
43 | this._blobRepository.Add(file);
44 |
45 | return this._blobRepository.UnitOfWork.CommitAsync();
46 | }
47 |
48 | ///
49 | ///
50 | ///
51 | ///
52 | public Task UploadBlobAsync(IEnumerable files)
53 | {
54 | foreach (var file in files)
55 | {
56 | this._blobRepository.Add(file);
57 | }
58 |
59 | return this._blobRepository.UnitOfWork.CommitAsync();
60 | }
61 |
62 |
63 |
64 | #endregion
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/Infrastructure.CrossCutting.SeedWork/IoC/IContainer.cs:
--------------------------------------------------------------------------------
1 | namespace Infrastructure.CrossCutting.Core
2 | {
3 | using System;
4 | using System.Collections.Generic;
5 |
6 | ///
7 | /// Base contract for locator and register dependencies
8 | ///
9 | public interface IContainer : IDisposable
10 | {
11 | ///
12 | /// Solve TService dependency
13 | ///
14 | /// Type of dependency
15 | /// instance of TService
16 | TService Resolve();
17 |
18 | ///
19 | /// Solve type construction and return the object as a TService instance
20 | ///
21 | /// instance of this type
22 | object Resolve(Type type);
23 |
24 | ///
25 | /// Register type into service locator
26 | ///
27 | /// Type to register
28 | void RegisterType(Type type);
29 |
30 | ///
31 | /// Solve type construction and return the list of resolved objects
32 | ///
33 | /// instance of this type
34 | IEnumerable ResolveAll(Type type);
35 |
36 | ///
37 | /// create a new child container
38 | ///
39 | /// child as instance of IContainer
40 | IContainer CreateChildContainer();
41 |
42 | ///
43 | /// register a type with specific member
44 | ///
45 | /// type interface
46 | /// instance member
47 | void RegisterInstance(Func instance);
48 |
49 | ///
50 | /// Regiter a type mmappin with a given container
51 | ///
52 | /// type interface
53 | /// type instance
54 | void RegisterInstance() where TTo : TFrom;
55 |
56 | }
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/Application.BoundedContext.Tests/Initializer/AssemblyTestsInitializerAzure.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.TestTools.UnitTesting;
2 | using System.Diagnostics;
3 | using System.Linq;
4 |
5 | namespace Application.BoundedConext.Tests
6 | {
7 | [TestClass]
8 | public class AssemblyTestsInitialize
9 | {
10 | private const string _windowsAzureStorageEmulatorPath = @"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\WAStorageEmulator.exe";
11 | private const string _win7ProcessName = "WAStorageEmulator";
12 | private const string _win8ProcessName = "WASTOR~1";
13 | private static readonly ProcessStartInfo startStorageEmulator = new ProcessStartInfo
14 | {
15 | FileName = _windowsAzureStorageEmulatorPath,
16 | Arguments = "start",
17 | };
18 |
19 | private static readonly ProcessStartInfo stopStorageEmulator = new ProcessStartInfo
20 | {
21 | FileName = _windowsAzureStorageEmulatorPath,
22 | Arguments = "stop",
23 | };
24 |
25 | [AssemblyInitialize]
26 | public static void LaunchEmulator(TestContext context)
27 | {
28 | StartStorageEmulator();
29 | }
30 |
31 |
32 | private static Process GetProcess()
33 | {
34 | return Process.GetProcessesByName(_win7ProcessName).FirstOrDefault() ?? Process.GetProcessesByName(_win8ProcessName).FirstOrDefault();
35 | }
36 |
37 | private static bool IsProcessStarted()
38 | {
39 | return GetProcess() != null;
40 | }
41 |
42 | private static void StartStorageEmulator()
43 | {
44 | if (!IsProcessStarted())
45 | {
46 | using (Process process = Process.Start(startStorageEmulator))
47 | {
48 | process.WaitForExit();
49 | }
50 | }
51 | }
52 |
53 |
54 | private static void StopStorageEmulator()
55 | {
56 | using (Process process = Process.Start(stopStorageEmulator))
57 | {
58 | process.WaitForExit();
59 | }
60 | }
61 |
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Domain.Core/IUnitOfWork.cs:
--------------------------------------------------------------------------------
1 | namespace Domain.Core
2 | {
3 | using System;
4 | using System.Threading;
5 | using System.Threading.Tasks;
6 |
7 | ///
8 | /// Contract for ‘UnitOfWork pattern’. For more
9 | /// This interface/contract should be complied by any UoW implementation to be used with this Domain.
10 | ///
11 | public interface IUnitOfWork
12 | : IDisposable
13 | {
14 | ///
15 | /// Commit all changes made in a container.
16 | ///
17 | ///
18 | /// If the entity have fixed properties and any optimistic concurrency problem exists,
19 | /// then an exception is thrown
20 | ///
21 | void Commit();
22 |
23 | ///
24 | /// Commit all changes made in a container.
25 | ///
26 | ///
27 | /// If the entity have fixed properties and any optimistic concurrency problem exists,
28 | /// then 'client changes' are refreshed - Client wins
29 | ///
30 | void CommitAndRefreshChanges();
31 |
32 | ///
33 | /// Rollback changes are not stored in the database at
34 | /// this moment. See references of UnitOfWork pattern
35 | ///
36 | void RollbackChanges();
37 |
38 | ///
39 | /// Commit all changes made in a container Async.
40 | ///
41 | ///
42 | /// If the entity have fixed properties and any optimistic concurrency problem exists,
43 | /// then an exception is thrown
44 | ///
45 | Task CommitAsync( CancellationToken cancellationToken = default(CancellationToken));
46 |
47 | ///
48 | /// Commit all changes made in a container Async.
49 | ///
50 | ///
51 | /// If the entity have fixed properties and any optimistic concurrency problem exists,
52 | /// then 'client changes' are refreshed - Client wins
53 | ///
54 | Task CommitAndRefreshChangesAsync(CancellationToken cancellationToken = default(CancellationToken));
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Infrastructure.Data.BoundedContext.Test/Repositories/OrganizationRepositoryTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.VisualStudio.TestTools.UnitTesting;
3 | using Domain.BoundedContext.ERPModule;
4 | using Infrastructure.CrossCutting.IoC;
5 | using System.Linq;
6 |
7 | namespace Infrastructure.Data.BoundedContext.Tests.Repositories
8 | {
9 | [TestClass]
10 | public class OrganizationRepositoryTests
11 | {
12 | [TestMethod]
13 | public void OrganizationRepository_GetByIdValidIdTest()
14 | {
15 | Guid id = new Guid("32f6c66a-d762-c890-3b5a-08d1ffaa17c7");
16 | IOrganizationRepository repo = IoCFactory.Instance.CurrentContainer.Resolve();
17 | Organization org= repo.GetElementById(id);
18 | Assert.IsNotNull((object)org);
19 | Assert.IsTrue(org.Id == id);
20 | }
21 |
22 | [TestMethod]
23 | public void OrganizationRepository_GetAllTest()
24 | {
25 | IOrganizationRepository repo = IoCFactory.Instance.CurrentContainer.Resolve();
26 | IQueryable all = repo.GetAllElements();
27 | Assert.IsNotNull(all);
28 | Assert.IsTrue( all.Count() > 0);
29 | }
30 |
31 | [TestMethod]
32 | public void UserRepository_AddTest_ValidUser_NewAddress()
33 | {
34 | IOrganizationRepository repo = IoCFactory.Instance.CurrentContainer.Resolve();
35 | Organization org = new Organization()
36 | {
37 | Id = new Guid("514c5873-bee8-cc78-3de8-08d1b9e806d0"),
38 | Name = "test2.test@test2.test",
39 | Address = new Address()
40 | {
41 | Id = Guid.NewGuid(),
42 | AddressLine1 = "test2",
43 | ZipCode = "12352",
44 | City = "Test2"
45 | }
46 | };
47 |
48 | repo.Add(org);
49 | repo.UnitOfWork.Commit();
50 | Organization byId = repo.GetElementById(org.Id);
51 | Assert.IsNotNull(byId);
52 | Assert.IsTrue(byId.Id == org.Id);
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client/Views/Manage/ManageLogins.cshtml:
--------------------------------------------------------------------------------
1 | @model ASP.NET.MVC5.Client.Models.ManageLoginsViewModel
2 | @using Microsoft.Owin.Security
3 | @{
4 | ViewBag.Title = "Manage your external logins";
5 | }
6 |
7 | @ViewBag.Title.
8 |
9 | @ViewBag.StatusMessage
10 | @if (Model.CurrentLogins.Count > 0)
11 | {
12 | Registered Logins
13 |
41 | }
42 | @if (Model.OtherLogins.Count > 0)
43 | {
44 | Add another service to log in.
45 |
46 | using (Html.BeginForm("LinkLogin", "Manage"))
47 | {
48 | @Html.AntiForgeryToken()
49 |
50 |
51 | @foreach (AuthenticationDescription p in Model.OtherLogins)
52 | {
53 | @p.AuthenticationType
54 | }
55 |
56 |
57 | }
58 | }
59 |
60 |
--------------------------------------------------------------------------------
/Domain.BoundedContext/ERPModule/Customer/Customer.cs:
--------------------------------------------------------------------------------
1 | namespace Domain.BoundedContext.ERPModule
2 | {
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel.DataAnnotations;
6 | using Domain.Core;
7 | using System.ComponentModel.DataAnnotations.Schema;
8 | using Domain.BoundedContext.Resources;
9 |
10 | ///
11 | /// Aggregate root for Customer Aggregate.
12 | ///
13 | [Table("Customers")]
14 | public class Customer
15 | : EntityBase
16 | {
17 |
18 |
19 | #region Properties
20 |
21 | ///
22 | /// Get or set the Given name of this customer
23 | ///
24 | [Required(ErrorMessageResourceName = "CustomerNameRequired", ErrorMessageResourceType = typeof(Messages))]
25 | public string Name { get; set; }
26 |
27 | ///
28 | /// Get or set the Given name of this customer
29 | ///
30 | public byte[] Logo { get; set; }
31 | ///
32 | /// Get or set the telephone
33 | ///
34 | [DataType(DataType.PhoneNumber, ErrorMessageResourceName = "InvalidPhoneNumber", ErrorMessageResourceType = typeof(Messages))]
35 | public string Phone { get; set; }
36 |
37 | ///
38 | /// Get or set the Email
39 | ///
40 | [DataType(DataType.EmailAddress, ErrorMessageResourceName = "EmailRequired", ErrorMessageResourceType = typeof(Messages))]
41 | public string Email { get; set; }
42 |
43 | ///
44 | /// Get or set if this customer is enabled
45 | ///
46 | public bool IsActive { get; set; }
47 |
48 | ///
49 | /// Get or set if this associated address identifier
50 | ///
51 |
52 | public Guid AddressId { get; set; }
53 |
54 | ///
55 | /// Get or set the address of this customer
56 | ///
57 | [ForeignKey("AddressId")]
58 | public virtual Address Address { get; set; }
59 |
60 | ///
61 | /// Get or set the Organization list
62 | ///
63 | public virtual ICollection Organizations { get; set; }
64 |
65 | #endregion
66 |
67 |
68 |
69 |
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Infrastructure.Data.Core/IQueryableUnitOfWork.cs:
--------------------------------------------------------------------------------
1 | //===================================================================================
2 | //
3 | //===================================================================================
4 | //
5 | //
6 | //
7 | //===================================================================================
8 | //
9 | //
10 | //
11 | //===================================================================================
12 |
13 |
14 |
15 | namespace Infrastructure.Data.Core
16 | {
17 | using System.Data.Entity;
18 | using Domain.Core;
19 | using System.Linq;
20 |
21 | ///
22 | /// The UnitOfWork contract for EF implementation
23 | ///
24 | /// This contract extend IUnitOfWork for use with EF code
25 | ///
26 | ///
27 | public interface IQueryableUnitOfWork
28 | : IUnitOfWork, ISql
29 | {
30 | ///
31 | /// Returns a IDbSet instance for access to entities of the given type in the context,
32 | /// the ObjectStateManager, and the underlying store.
33 | ///
34 | ///
35 | ///
36 | IQueryable CreateSet() where TEntity : class,new();
37 |
38 | ///
39 | /// Attach this item into "ObjectStateManager"
40 | ///
41 | /// The type of entity
42 | /// The item <
43 | void Attach(TEntity item) where TEntity : class;
44 |
45 | ///
46 | /// Set object as modified
47 | ///
48 | /// The type of entity
49 | /// The entity item to set as modifed
50 | void SetModified(TEntity item) where TEntity : class;
51 |
52 | ///
53 | /// Apply current values in
54 | ///
55 | /// The type of entity
56 | /// The original entity
57 | /// The current entity
58 | void ApplyCurrentValues(TEntity original, TEntity current) where TEntity : class;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Infrastructure.Data.BoundedContext.Test/Repositories/EquipmentAggregateRepositotyTests.cs:
--------------------------------------------------------------------------------
1 | using Domain.BoundedContext.StoreModule;
2 | using Infrastructure.CrossCutting.IoC;
3 | using Microsoft.VisualStudio.TestTools.UnitTesting;
4 | using System;
5 | using System.Linq;
6 |
7 | namespace Infrastructure.Data.BoundedContext.tests.Membership
8 | {
9 | [TestClass]
10 | public class EquipmentAggregateRepositotyTests
11 | {
12 | [TestMethod]
13 | public void EquipmentAggregateRepositoty_GetByIdValidIdTest()
14 | {
15 | Guid guid = new Guid("602D9F0C-40DA-4FCE-8C4D-F22748D5FB2D");
16 | IEquipmentAggregateRepository repo = IoCFactory.Instance.CurrentContainer.Resolve();
17 | EquipmentAggregate equipment= repo.GetElementById(guid);
18 | Assert.IsNotNull(equipment);
19 | Assert.IsTrue(equipment.Id == guid);
20 | }
21 |
22 |
23 | [TestMethod]
24 | public void EquipmentAggregateRepositoty_GetAllTest()
25 | {
26 | IQueryable all = IoCFactory.Instance.CurrentContainer.Resolve().GetAllElements();
27 | Assert.IsNotNull(all);
28 | Assert.IsTrue(all.Any());
29 | }
30 |
31 | [TestMethod]
32 | public void EquipmentAggregateRepositoty_AddTest()
33 | {
34 | IEquipmentAggregateRepository repo = IoCFactory.Instance.CurrentContainer.Resolve();
35 | EquipmentAggregate equipment = new EquipmentAggregate()
36 | {
37 | Id = Guid.NewGuid(),
38 | DepartmentId = Guid.NewGuid(),
39 | DepartmentName="test facility",
40 | Model = "Type of equipment",
41 | Name = "test equipment"
42 | };
43 | repo.Add(equipment);
44 | repo.UnitOfWork.Commit();
45 | var all = repo.GetAllElements();
46 | Assert.IsNotNull(all);
47 | Assert.IsTrue(all.Count()>1);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Application.BoundedContext/StoreModule/EquipmentAggregateManagementService.cs:
--------------------------------------------------------------------------------
1 | namespace Application.BoundedConext.StoreModule
2 | {
3 | using Domain.BoundedContext.StoreModule;
4 | using Infrastructure.CrossCutting.Core;
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Threading;
8 | using System.Threading.Tasks;
9 | public class EquipmentAggregateManagementService : IEquipmentAggregateManagementService
10 | {
11 |
12 | private IEquipmentAggregateRepository _equipmentAggregateRepository;
13 | private ILogger _logger;
14 |
15 | public EquipmentAggregateManagementService(IEquipmentAggregateRepository equipmentAggregateRepository, ILogger logger)
16 | {
17 | if (equipmentAggregateRepository == (IEquipmentAggregateRepository)null)
18 | throw new ArgumentNullException("equipmentAggregateRepository");
19 | if (logger == (ILogger)null)
20 | throw new ArgumentNullException("logger");
21 | this._equipmentAggregateRepository = equipmentAggregateRepository;
22 | this._logger = logger;
23 | }
24 |
25 | ///
26 | ///
27 | ///
28 | ///
29 | ///
30 | ///
31 | public Task AddEquipmentAsync(EquipmentAggregate equipmentAggregate, CancellationToken cancellationToken = default(CancellationToken))
32 | {
33 | cancellationToken.ThrowIfCancellationRequested();
34 | if (equipmentAggregate == (EquipmentAggregate)null)
35 | throw new ArgumentNullException("equipmentAggregate");
36 | _equipmentAggregateRepository.Add(equipmentAggregate);
37 | return Task.Run(() =>
38 | {
39 | _equipmentAggregateRepository.UnitOfWork.Commit();
40 | });
41 |
42 | }
43 |
44 | ///
45 | ///
46 | ///
47 | ///
48 | ///
49 | public Task> GetAllEquipmentAsync(CancellationToken cancellationToken = default(CancellationToken))
50 | {
51 | return Task.FromResult>(this._equipmentAggregateRepository.GetAllElements());
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Application.Core/Application.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {CEEE0E39-E857-48E9-9008-732A8F7AEB4A}
8 | Library
9 | Properties
10 | Application.Core
11 | Application.Core
12 | v4.5
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
52 |
--------------------------------------------------------------------------------
/Application.BoundedContext/ERPModule/DepartmentAggregateManagementService.cs:
--------------------------------------------------------------------------------
1 | using Domain.BoundedContext.ERPModule;
2 | using Infrastructure.CrossCutting.Core;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading;
8 | using System.Threading.Tasks;
9 |
10 | namespace Application.BoundedConext.ERPModule
11 | {
12 | public class DepartmentAggregateManagementService : IDepartmentAggregateManagementService
13 | {
14 |
15 | #region Ctor
16 |
17 | private IDepartmentAggregateRepository _departmentAggregateRepository;
18 | private ILogger _logger;
19 |
20 | public DepartmentAggregateManagementService(IDepartmentAggregateRepository departmentAggregateRepository, ILogger logger)
21 | {
22 | if (departmentAggregateRepository == (IDepartmentAggregateRepository)null)
23 | throw new ArgumentNullException("departmentAggregateRepository");
24 | if (logger == (ILogger)null)
25 | throw new ArgumentNullException("logger");
26 | this._departmentAggregateRepository = departmentAggregateRepository;
27 | this._logger = logger;
28 | }
29 |
30 |
31 | #endregion
32 |
33 | #region IDepartmentAggregateManagementService
34 | ///
35 | ///
36 | ///
37 | ///
38 | ///
39 | ///
40 | public Task AddDepartmentAsync(DepartmentAggregate department, CancellationToken cancellationToken = default(CancellationToken))
41 | {
42 | cancellationToken.ThrowIfCancellationRequested();
43 | if (department == (DepartmentAggregate)null)
44 | throw new ArgumentNullException("department");
45 | _departmentAggregateRepository.Add(department);
46 | return Task.Run(() =>
47 | {
48 | _departmentAggregateRepository.UnitOfWork.Commit();
49 | });
50 | }
51 |
52 | ///
53 | ///
54 | ///
55 | ///
56 | ///
57 | public Task> GetAllDepartmentsAsync(CancellationToken cancellationToken = default(CancellationToken))
58 | {
59 | return Task.FromResult>(this._departmentAggregateRepository.GetAllElements());
60 | }
61 | }
62 | #endregion
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/ASP.NET.MVC5.Client.Cloud.Azure/ASP.NET.MVC5.Client.CloudContent/diagnostics.wadcfgx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | true
38 |
--------------------------------------------------------------------------------
/Infrastructure.Data.BoundedContext.Tests/Infrastructure.Data.BoundedContext.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 45351e54-6528-493e-b0d8-27c7d7bea1ed
8 | Library
9 | Properties
10 | Infrastructure.Data.BoundedContext.Tests
11 | Infrastructure.Data.BoundedContext.Tests
12 | v4.5
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Infrastructure.Data.BoundedContext/Repositories/ERPModule/DepartmentAggregateRepository.cs:
--------------------------------------------------------------------------------
1 | namespace Infrastructure.Data.BoundedContext.Repositories.ERPModule
2 | {
3 | using Domain.BoundedContext.ERPModule;
4 | using Infrastructure.CrossCutting.Core;
5 | using Infrastructure.Data.BoundedContext.Resources;
6 | using Infrastructure.Data.BoundedContext.UnitOfWork.Mongo;
7 | using Infrastructure.Data.Core;
8 | using System;
9 | using System.Linq;
10 | public class DepartmentAggregateRepository : Repository, IDepartmentAggregateRepository
11 | {
12 |
13 | #region Constructor
14 |
15 | ///
16 | /// Create a new instance
17 | ///
18 | /// Associated unit of work
19 | /// Associated logger
20 | public DepartmentAggregateRepository(IMongoUnitOfWork unitOfWork, ILogger logger)
21 | : base(unitOfWork, logger)
22 | {
23 | }
24 |
25 |
26 | ///
27 | ///
28 | ///
29 | ///
30 | public override void Add(DepartmentAggregate item)
31 | {
32 | if (item == (DepartmentAggregate)null)
33 | throw new ArgumentNullException(typeof(DepartmentAggregate).ToString(), Messages.CannotAddNullEntity);
34 | var UofW = this.UnitOfWork as IMongoUnitOfWork;
35 | UofW.Departments.Add(item);
36 | }
37 |
38 | ///
39 | ///
40 | ///
41 | ///
42 | ///
43 | public override DepartmentAggregate GetElementById(Guid Id)
44 | {
45 | var UofW = this.UnitOfWork as IQueryableUnitOfWork;
46 | var query = UofW.CreateSet();
47 |
48 | return query.FirstOrDefault(x => x.Id == Id);
49 | }
50 |
51 | ///
52 | ///
53 | ///
54 | ///
55 | public override IQueryable GetAllElements()
56 | {
57 | var UofW = this.UnitOfWork as IQueryableUnitOfWork;
58 |
59 | return UofW.CreateSet();
60 | }
61 |
62 | #endregion
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
21 | @foreach (AuthenticationDescription p in loginProviders) { 22 | 23 | } 24 |
25 |