neozhu/CleanArchitectureCodeGenerator

Error while scaffolding new class

Closed this issue · 0 comments

Hi,
I am using CleanArchitectureWithBlazorServer-1.0-preview.6 to create a project.
Changing the default project and run, will encounter some errors, but after replacing this line
@using Blazor.Server.UI.Services.JsInterop;
with this
@using Server.UI.Services.JsInterop;
The three errors will disappear. Then run the program with no errors.

By using CleanArchitecture CodeGenerator For Blazor App extension,
tried to add new entity such as

namespace TestCleanArchitecture.Domain.Entities;
public class Student : BaseAuditableEntity
{
public string? Name { get; set; }
public string? Semester { get; set; }
public DateOnly BirthDate { get; set; }
}

While scaffolding the Student class, I have received the following errors:

Error CS0246 The type or namespace name 'CleanArchitecture' could not be found (are you missing a using directive or an assembly reference?) Server.UI C:\test\TestCleanArchitecture\src\Server.UI\Pages\Students\Components\StudentFormDialog.razor 1 Active

Error CS1061 'IApplicationDbContext' does not contain a definition for 'Students' and no accessible extension method 'Students' accepting a first argument of type 'IApplicationDbContext' could be found (are you missing a using directive or an assembly reference?) Application C:\test\TestCleanArchitecture\src\Application\Features\Students\Commands\AddEdit\AddEditStudentCommand.cs 63 Active

Error (active) CS0117 'Permissions' does not contain a definition for 'Students' Server.UI C:\test\TestCleanArchitecture\src\Server.UI\Pages\Students\Students.razor 16

Could you kindly check what was wrong.

Thank you.