| | | 1 | | // <auto-generated /> |
| | | 2 | | #nullable enable |
| | | 3 | | namespace Api.Works.DTOs |
| | | 4 | | { |
| | | 5 | | public static partial class WorkGetDTOMapper |
| | | 6 | | { |
| | | 7 | | [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "4.3.1.0")] |
| | | 8 | | public static partial global::Api.Works.DTOs.WorkGetDTO ToDto(global::Api.Works.Models.Work w) |
| | 0 | 9 | | { |
| | 0 | 10 | | var target = new global::Api.Works.DTOs.WorkGetDTO( |
| | 0 | 11 | | w.Id, |
| | 0 | 12 | | w.RowVersion, |
| | 0 | 13 | | w.MetadataAddedAt, |
| | 0 | 14 | | w.MetadataUpdatedAt, |
| | 0 | 15 | | w.Title, |
| | 0 | 16 | | w.Description, |
| | 0 | 17 | | w.WorkPublishedAt, |
| | 0 | 18 | | w.WorkUpdatedAt, |
| | 0 | 19 | | MapToTagGetDTOArray(w.WorkTags), |
| | 0 | 20 | | MapToAuthorGetDTOArray(w.Authors), |
| | 0 | 21 | | MapToWorkIdentifierDTOArray(w.WorkIdentifiers) |
| | 0 | 22 | | ); |
| | 0 | 23 | | return target; |
| | 0 | 24 | | } |
| | | 25 | | |
| | | 26 | | [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "4.3.1.0")] |
| | | 27 | | private static global::Api.Works.DTOs.TagGetDTO MapToTagGetDTO(global::Api.Works.Models.WorkTag source) |
| | 0 | 28 | | { |
| | 0 | 29 | | var target = new global::Api.Works.DTOs.TagGetDTO( |
| | 0 | 30 | | source.Id, |
| | 0 | 31 | | source.RowVersion, |
| | 0 | 32 | | source.MetadataAddedAt, |
| | 0 | 33 | | source.MetadataUpdatedAt, |
| | 0 | 34 | | source.TagType, |
| | 0 | 35 | | source.TagName |
| | 0 | 36 | | ); |
| | 0 | 37 | | return target; |
| | 0 | 38 | | } |
| | | 39 | | |
| | | 40 | | [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "4.3.1.0")] |
| | | 41 | | private static global::Api.Works.DTOs.TagGetDTO[] MapToTagGetDTOArray(global::System.Collections.Generic.IReadOn |
| | 0 | 42 | | { |
| | 0 | 43 | | var target = new global::Api.Works.DTOs.TagGetDTO[source.Count]; |
| | 0 | 44 | | var i = 0; |
| | 0 | 45 | | foreach (var item in source) |
| | 0 | 46 | | { |
| | 0 | 47 | | target[i] = MapToTagGetDTO(item); |
| | 0 | 48 | | i++; |
| | 0 | 49 | | } |
| | 0 | 50 | | return target; |
| | 0 | 51 | | } |
| | | 52 | | |
| | | 53 | | [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "4.3.1.0")] |
| | | 54 | | private static global::Api.Works.DTOs.AuthorGetDTO MapToAuthorGetDTO(global::Api.Works.Models.Author source) |
| | 0 | 55 | | { |
| | 0 | 56 | | var target = new global::Api.Works.DTOs.AuthorGetDTO( |
| | 0 | 57 | | source.Id, |
| | 0 | 58 | | source.RowVersion, |
| | 0 | 59 | | source.MetadataAddedAt, |
| | 0 | 60 | | source.MetadataUpdatedAt, |
| | 0 | 61 | | source.FirstName, |
| | 0 | 62 | | source.LastName, |
| | 0 | 63 | | source.DisplayName, |
| | 0 | 64 | | global::System.Linq.Enumerable.ToArray(source.PenNames) |
| | 0 | 65 | | ); |
| | 0 | 66 | | return target; |
| | 0 | 67 | | } |
| | | 68 | | |
| | | 69 | | [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "4.3.1.0")] |
| | | 70 | | private static global::Api.Works.DTOs.AuthorGetDTO[] MapToAuthorGetDTOArray(global::System.Collections.Generic.I |
| | 0 | 71 | | { |
| | 0 | 72 | | var target = new global::Api.Works.DTOs.AuthorGetDTO[source.Count]; |
| | 0 | 73 | | var i = 0; |
| | 0 | 74 | | foreach (var item in source) |
| | 0 | 75 | | { |
| | 0 | 76 | | target[i] = MapToAuthorGetDTO(item); |
| | 0 | 77 | | i++; |
| | 0 | 78 | | } |
| | 0 | 79 | | return target; |
| | 0 | 80 | | } |
| | | 81 | | |
| | | 82 | | [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "4.3.1.0")] |
| | | 83 | | private static global::Api.Works.DTOs.WorkIdentifierDTO MapToWorkIdentifierDTO(global::Api.Works.Models.WorkIden |
| | 0 | 84 | | { |
| | 0 | 85 | | var target = new global::Api.Works.DTOs.WorkIdentifierDTO(); |
| | 0 | 86 | | target.WorkIdentifierType = source.WorkIdentifierType; |
| | 0 | 87 | | target.WorkIdentifierValue = source.WorkIdentifierValue; |
| | 0 | 88 | | return target; |
| | 0 | 89 | | } |
| | | 90 | | |
| | | 91 | | [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "4.3.1.0")] |
| | | 92 | | private static global::Api.Works.DTOs.WorkIdentifierDTO[] MapToWorkIdentifierDTOArray(global::System.Collections |
| | 0 | 93 | | { |
| | 0 | 94 | | var target = new global::Api.Works.DTOs.WorkIdentifierDTO[source.Count]; |
| | 0 | 95 | | var i = 0; |
| | 0 | 96 | | foreach (var item in source) |
| | 0 | 97 | | { |
| | 0 | 98 | | target[i] = MapToWorkIdentifierDTO(item); |
| | 0 | 99 | | i++; |
| | 0 | 100 | | } |
| | 0 | 101 | | return target; |
| | 0 | 102 | | } |
| | | 103 | | } |
| | | 104 | | } |