| | | 1 | | // <auto-generated /> |
| | | 2 | | #nullable enable |
| | | 3 | | namespace Api.Works.Queries |
| | | 4 | | { |
| | | 5 | | public static partial class WorkMapper |
| | | 6 | | { |
| | | 7 | | [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "4.3.1.0")] |
| | | 8 | | public static partial global::Api.Works.Models.WorkIdentifier FromWorkIdDto(global::Api.Works.Queries.WorkIdenti |
| | 1 | 9 | | { |
| | 1 | 10 | | var target = new global::Api.Works.Models.WorkIdentifier(w.WorkIdentifierType, w.WorkIdentifierValue); |
| | 1 | 11 | | return target; |
| | 1 | 12 | | } |
| | | 13 | | |
| | | 14 | | [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "4.3.1.0")] |
| | | 15 | | [return: global::System.Diagnostics.CodeAnalysis.NotNullIfNotNull(nameof(w))] |
| | | 16 | | public static partial global::Api.Works.Queries.Work? ToDto(global::Api.Works.Models.Work? w) |
| | 1 | 17 | | { |
| | 1 | 18 | | if (w == null) |
| | 0 | 19 | | return default; |
| | 1 | 20 | | var target = new global::Api.Works.Queries.Work() |
| | 1 | 21 | | { |
| | 1 | 22 | | Title = w.Title, |
| | 1 | 23 | | }; |
| | 1 | 24 | | target.Id = w.Id; |
| | 1 | 25 | | target.RowVersion = w.RowVersion; |
| | 1 | 26 | | target.MetadataAddedAt = w.MetadataAddedAt; |
| | 1 | 27 | | target.MetadataUpdatedAt = w.MetadataUpdatedAt; |
| | 1 | 28 | | target.Description = w.Description; |
| | 1 | 29 | | if (w.WorkPublishedAt != null) |
| | 1 | 30 | | { |
| | 1 | 31 | | target.WorkPublishedAt = w.WorkPublishedAt.Value.ToInstant(); |
| | 1 | 32 | | } |
| | | 33 | | else |
| | 1 | 34 | | { |
| | 1 | 35 | | target.WorkPublishedAt = null; |
| | 1 | 36 | | } |
| | 1 | 37 | | if (w.WorkUpdatedAt != null) |
| | 1 | 38 | | { |
| | 1 | 39 | | target.WorkUpdatedAt = w.WorkUpdatedAt.Value.ToInstant(); |
| | 1 | 40 | | } |
| | | 41 | | else |
| | 1 | 42 | | { |
| | 1 | 43 | | target.WorkUpdatedAt = null; |
| | 1 | 44 | | } |
| | 1 | 45 | | target.WorkIdentifiers = MapToListOfWorkIdentifier(w.WorkIdentifiers); |
| | 1 | 46 | | return target; |
| | 1 | 47 | | } |
| | | 48 | | |
| | | 49 | | [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "4.3.1.0")] |
| | | 50 | | public static partial global::System.Linq.IQueryable<global::Api.Works.Queries.Work> ProjectToDto(this global::S |
| | 1 | 51 | | { |
| | | 52 | | #nullable disable |
| | 1 | 53 | | return global::System.Linq.Queryable.Select( |
| | 1 | 54 | | q, |
| | 1 | 55 | | x => new global::Api.Works.Queries.Work() |
| | 1 | 56 | | { |
| | 1 | 57 | | Id = x.Id, |
| | 1 | 58 | | RowVersion = x.RowVersion, |
| | 1 | 59 | | MetadataAddedAt = x.MetadataAddedAt, |
| | 1 | 60 | | MetadataUpdatedAt = x.MetadataUpdatedAt, |
| | 1 | 61 | | Title = x.Title, |
| | 1 | 62 | | Description = x.Description, |
| | 1 | 63 | | WorkPublishedAt = x.WorkPublishedAt != null ? x.WorkPublishedAt.Value.ToInstant() : default(global:: |
| | 1 | 64 | | WorkUpdatedAt = x.WorkUpdatedAt != null ? x.WorkUpdatedAt.Value.ToInstant() : default(global::NodaTi |
| | 1 | 65 | | WorkIdentifiers = global::System.Linq.Enumerable.ToList( |
| | 1 | 66 | | global::System.Linq.Enumerable.Select( |
| | 1 | 67 | | x.WorkIdentifiers, |
| | 1 | 68 | | x1 => new global::Api.Works.Queries.WorkIdentifier(x1.WorkIdentifierType, x1.WorkIdentifierV |
| | 1 | 69 | | ) |
| | 1 | 70 | | ), |
| | 1 | 71 | | } |
| | 1 | 72 | | ); |
| | | 73 | | #nullable enable |
| | 1 | 74 | | } |
| | | 75 | | |
| | | 76 | | [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "4.3.1.0")] |
| | | 77 | | private static global::Api.Works.Queries.WorkIdentifier MapToWorkIdentifier(global::Api.Works.Models.WorkIdentif |
| | 1 | 78 | | { |
| | 1 | 79 | | var target = new global::Api.Works.Queries.WorkIdentifier(source.WorkIdentifierType, source.WorkIdentifierVa |
| | 1 | 80 | | return target; |
| | 1 | 81 | | } |
| | | 82 | | |
| | | 83 | | [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "4.3.1.0")] |
| | | 84 | | private static global::System.Collections.Generic.List<global::Api.Works.Queries.WorkIdentifier> MapToListOfWork |
| | 1 | 85 | | { |
| | 1 | 86 | | var target = new global::System.Collections.Generic.List<global::Api.Works.Queries.WorkIdentifier>(source.Co |
| | 1 | 87 | | foreach (var item in source) |
| | 1 | 88 | | { |
| | 1 | 89 | | target.Add(MapToWorkIdentifier(item)); |
| | 1 | 90 | | } |
| | 1 | 91 | | return target; |
| | 1 | 92 | | } |
| | | 93 | | } |
| | | 94 | | } |