question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hey @neozhu and @Bram1903

Issue fixed by cloning the other repo and building it after instructions from @neozhu

Still extremly happy with the project. I’m trying to use the codegenerator (yes i know it’s on different github repo). I’ve installed vs 2022 community edition and when I generate stuff for any class i’ve is that it isn’t compilable after.

In the DTO’s mapFrom is used and that isn’t the case in this source code.

Code it generates:

public class SoftwareDto:IMapFrom<Software>
{
    public void Mapping(Profile profile)
    {
        profile.CreateMap<Software, SoftwareDto>().ReverseMap();
    }
    // TODO: define data transfer object (DTO) fields, for example:
        [Description("Id")]
    public int Id {get;set;} 
    [Description("Name")]
    public string Name {get;set;} = String.Empty; 
    [Description("Description")]
    public string? Description {get;set;} 

}

ProductDTO in this repo is like:

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace myapp.Application.Features.Products.DTOs;

[Description("Products")]
public class ProductDto
{
    [Description("Id")] public int Id { get; set; }

    [Description("Product Name")] public string? Name { get; set; }

    [Description("Description")] public string? Description { get; set; }

    [Description("Unit")] public string? Unit { get; set; }

    [Description("Brand Name")] public string? Brand { get; set; }

    [Description("Price")] public decimal Price { get; set; }

    [Description("Pictures")] public List<ProductImage>? Pictures { get; set; }

    private class Mapping : Profile
    {
        public Mapping()
        {
            CreateMap<Product, ProductDto>().ReverseMap();
        }
    }
}

MapFrom is used in multiple files it generates so its a little bit of cleaning up to make use of it.

It’s still quite a headstart to use the generator. But could you take a look and see what’s wrong compared to project here?

Issue Analytics

  • State:closed
  • Created 2 months ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
neozhucommented, Jul 12, 2023

I will set a action for Publish extension to Marketplace

Thank you but its also really cool to have access to the extension code, if I e.g. want to update generated UI template I can do that. It’s really cool, ty for learning me all this by having this repo public and answering questions

https://www.vsixgallery.com/extension/6A168388-B6A2-42F9-BA5A-B577D3CD4DB5

1reaction
jochem4207commented, Jul 13, 2023

@neozhu you’re amazing !

Read more comments on GitHub >

github_iconTop Results From Across the Web

QR Code Generator | Create Your Free QR Codes
QR Code Generator for URL, vCard, and more. Add logo, colors, frames, and download in high print quality. Get your free QR Codes...
Read more >
Code Generator | CodePal - The Ultimate Coding Companion
Code generation is the process of automatically creating computer source code from a higher-level representation, such as a design specification, a graphical ...
Read more >
Free Random Codes Generator
Use Voucherify free code generator to generate unique codes that can be used for coupons, gift cards, passwords, and more.
Read more >
QR Code Generator
Free Online QR Code Generator to make your own QR Codes. Supports Dynamic Codes, Tracking, Analytics, Free text, vCards and more.
Read more >
CodeGenerator Class (System.CodeDom.Compiler)
Code generators are capable of rendering source code in a specific language according to the structure of a Code Document Object Model (CodeDOM)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found