can't call dto classes from Application layer to Shared layer on asp.net razor pages ?

Ahmed Salah Abed Elaziz 390 Reputation points
2024-02-20T06:45:46.7+00:00

I work on asp.net core on razor page i face issue i can't call DTO classes from application layer in shared layer  my web application contain 4 layer Application(have DTO classes) Core Host Shared(place i need to call DTO classes) when i come on shared layer and call dto classes that exist on application layer  not added  i try on shared layer add  using UC.ADC.Application.Asset.Dto; class i need to call on Application Layer on Dto Folder

namespace UC.ADC.Application.Asset.Dto
{
    public class AssetBranchesItems
    {
        public string SelectedMCU { get; set; }

        public string SelectedMCUName { get; set; }
    }
}

on shared layer i can't call DTO class above from application layer and it give me compile error

namespace UC.ADC.Shared.Assets 
{ 
public class DisplayAssetTaggingDetails 
{ 
public List<AssetBranchesItems> asstBranchesLists{ get; set; } 
} 
}

if i try to add on shared layer  UC.ADC.Application.Asset.Dto  not accept add UC.ADC.Application.Asset.Dto and also when i write on shared layer  public List<AssetBranchesItems> asstBranchesLists{ get; set; } not auto complete or detect that class AssetBranchesItems   exist on application layer  so what i do to solve this issue

Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | ASP.NET | Other
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.