diff --git a/BlueWest.Data/Data/AAttribute.cs b/BlueWest.Data/Data/AAttribute.cs new file mode 100644 index 0000000..30e0ee6 --- /dev/null +++ b/BlueWest.Data/Data/AAttribute.cs @@ -0,0 +1,25 @@ +using System; + +namespace BlueWest.Data +{ + /// + /// Specifies that the annotated class can be mapped from the provided . + /// + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)] + public sealed class AAttribute : Attribute + { + /// + /// Initializes a new instance of the class with the specified . + /// + /// The type of to map from. + public AAttribute(Type sourceType) + { + SourceType = sourceType; + } + + /// + /// Gets the type to map from. + /// + public Type SourceType { get; } + } +} \ No newline at end of file diff --git a/BlueWest.Data/Data/FinanceTransaction.cs b/BlueWest.Data/Data/FinanceTransaction.cs index 810a298..742ef3f 100644 --- a/BlueWest.Data/Data/FinanceTransaction.cs +++ b/BlueWest.Data/Data/FinanceTransaction.cs @@ -22,7 +22,7 @@ namespace BlueWest.Data } [MessagePackObject] - public struct FinanceTransaction + public partial struct FinanceTransaction { [Key(1)] public int Id { get; set; } [Key(2)] public int UserId { get; set; } diff --git a/BlueWest.Data/Data/FinanceTransactionReadDto.cs b/BlueWest.Data/Data/FinanceTransactionReadDto.cs new file mode 100644 index 0000000..0b667ee --- /dev/null +++ b/BlueWest.Data/Data/FinanceTransactionReadDto.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; +using MapTo; + +namespace BlueWest.Data +{ + [AAttribute(typeof(FinanceTransaction))] + public partial class FinanceTransactionReadDto + { + } +} diff --git a/BlueWest.sln b/BlueWest.sln index b28f4f5..0800809 100644 --- a/BlueWest.sln +++ b/BlueWest.sln @@ -1,14 +1,15 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest", "BlueWest\BlueWest.csproj", "{293E7852-8AFD-4EFB-8C2D-F1BBE68AEE78}" +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31911.196 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest", "BlueWest\BlueWest.csproj", "{293E7852-8AFD-4EFB-8C2D-F1BBE68AEE78}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.Data", "BlueWest.Data\BlueWest.Data.csproj", "{E518C62D-768C-4885-9C9D-FD5761605B54}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.Data", "BlueWest.Data\BlueWest.Data.csproj", "{E518C62D-768C-4885-9C9D-FD5761605B54}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.WebApi", "BlueWest.WebApi\BlueWest.WebApi.csproj", "{6D3321B5-CF1A-4251-B28D-329EDA6DC278}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.WebApi", "BlueWest.WebApi\BlueWest.WebApi.csproj", "{6D3321B5-CF1A-4251-B28D-329EDA6DC278}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.Collections", "BlueWest.Collections\BlueWest.Collections.csproj", "{F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapTo", "MapTo\src\MapTo\MapTo.csproj", "{7D8CF461-E20D-48A0-981C-5B60792C56C8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.Collections", "BlueWest.Collections\BlueWest.Collections.csproj", "{F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -32,9 +33,11 @@ Global {F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}.Debug|Any CPU.Build.0 = Debug|Any CPU {F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}.Release|Any CPU.ActiveCfg = Release|Any CPU {F55019A2-E2A8-4AF1-8FBC-FA99476A1B1C}.Release|Any CPU.Build.0 = Release|Any CPU - {7D8CF461-E20D-48A0-981C-5B60792C56C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7D8CF461-E20D-48A0-981C-5B60792C56C8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7D8CF461-E20D-48A0-981C-5B60792C56C8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7D8CF461-E20D-48A0-981C-5B60792C56C8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F24E44CA-98BA-4B44-A1E1-57912CC5DCC3} EndGlobalSection EndGlobal diff --git a/MapTo b/MapTo index 4d73897..e314387 160000 --- a/MapTo +++ b/MapTo @@ -1 +1 @@ -Subproject commit 4d73897b4e007d690655fdee6813124dc33d88ea +Subproject commit e3143877729241799c8c578bc4efb062ace8ba00