by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    nicolas63
    @nicolas63
    oh yes, my bad sorry =(. can you try https://github.com/jhipster/jhipster-dotnetcore/pull/316/ ?
    Ivan Monteiro Cantalice
    @ivanmonteiro

    Yes the user service need to used user entity and no dto. For naming i think plural is better

    thanks

    Ivan Monteiro Cantalice
    @ivanmonteiro
    I have one question about the Paging/IPageable classes and interfaces
    The service will have one method that returns a IPage<Employee>
    The paging classes/interfaces are currently at the JHipsterNet project (that will probably be extracted to a nuget package in the future)
    Is it ok to add a reference to this package on the Domain project?
    nicolas63
    @nicolas63
    Yes, no problem with this
    nicolas63
    @nicolas63
    @manisi i have merge a fix
    manisi
    @manisi
    @nicolas63 Thanks to you, automapper bug fixed ,but when run app rise this Error:
     3>SampleEntityDTO.cs(4,30): error CS0234: The type or namespace name 'Enums' does not exist in the namespace 'MyCompany.Crosscutting' (are you missing an assembly reference?) [/Users/developer/Desktop/dotnetcoresample/src/Dotnetcoresample.Dto/Dotnetcoresample.Dto.csproj]
     3>Done Building Project "/Users/developer/Desktop/dotnetcoresample/src/Dotnetcoresample.Dto/Dotnetcoresample.Dto.csproj" (default targets) -- FAILED.
     4>SampleEntity.cs(5,30): error CS0234: The type or namespace name 'Enums' does not exist in the namespace 'MyCompany.Crosscutting' (are you missing an assembly reference?) [/Users/developer/Desktop/dotnetcoresample/src/Dotnetcoresample.Domain/Dotnetcoresample.Domain.csproj]
     4>Done Building Project "/Users/developer/Desktop/dotnetcoresample/src/Dotnetcoresample.Domain/Dotnetcoresample.Domain.csproj" (default targets) -- FAILED.
     1>Done Building Project "/Users/developer/Desktop/dotnetcoresample/src/Dotnetcoresample/Dotnetcoresample.csproj" (default targets) -- FAILED.
    Build FAILED.
       "/Users/developer/Desktop/dotnetcoresample/src/Dotnetcoresample/Dotnetcoresample.csproj" (default target) (1:7) ->
       "/Users/developer/Desktop/dotnetcoresample/src/Dotnetcoresample.Dto/Dotnetcoresample.Dto.csproj" (default target) (3:6) ->
       (CoreCompile target) -> 
         SampleEntityDTO.cs(4,30): error CS0234: The type or namespace name 'Enums' does not exist in the namespace 'MyCompany.Crosscutting' (are you missing an assembly reference?) [/Users/developer/Desktop/dotnetcoresample/src/Dotnetcoresample.Dto/Dotnetcoresample.Dto.csproj]
    
    
       "/Users/developer/Desktop/dotnetcoresample/src/Dotnetcoresample/Dotnetcoresample.csproj" (default target) (1:7) ->
       "/Users/developer/Desktop/dotnetcoresample/src/Dotnetcoresample.Domain/Dotnetcoresample.Domain.csproj" (default target) (4:6) ->
         SampleEntity.cs(5,30): error CS0234: The type or namespace name 'Enums' does not exist in the namespace 'MyCompany.Crosscutting' (are you missing an assembly reference?) [/Users/developer/Desktop/dotnetcoresample/src/Dotnetcoresample.Domain/Dotnetcoresample.Domain.csproj]
    
    0 Warning(s)
    2 Error(s)
    nicolas63
    @nicolas63
    Here we reference crosscuting enums and you don't have enum, can you open an issue with this log ? I work on it as soon as possible
    Ivan Monteiro Cantalice
    @ivanmonteiro
    Here we reference crosscuting enums and you don't have enum, can you open an issue with this log ? I work on it as soon as possible
    I added a check for this at the dto on the dto renaming PR. But a check at the Entity.cs.ejs is also needed to avoid using the enum namespace if no enum is present at the entity
    nicolas63
    @nicolas63
    @ivanmonteiro thanks for this information i think added this check on the entity and controllers maybe create a method like main generator '_processJavaEntityImports'
    manisi
    @manisi
    @nicolas63 Hello, when use many-to-one relation entity ,client entity form(angular) in Edit mode and View mode does not relation data value. then dropDown field(lookup) is null and relation value there is not in response . is related to Dto mapping for save Entity and relation to database?
    nicolas63
    @nicolas63
    @manisi maybe i have try this recently with no dto and it works. Can you look http request ?
    There is no response from the server ?
    manisi
    @manisi
    @nicolas63 yes does not related entity in response after form submit . the value of related entity not bind to form
    This message was deleted
    manisi
    @manisi
    @nicolas63 Sorry ,without Dto that's OK.
    nicolas63
    @nicolas63
    Ok thanks for your feedback can you open an issue ? Maybe @ivanmonteiro can look this ?
    manisi
    @manisi
    @nicolas63 Ok . Thanks
    manisi
    @manisi
    @nicolas63 when edit form and change value of related entity (change lookup value) and submit form:2020-07-31 23:08:09.186 INFO 9764 --- [ 35] M.AspNetCore.Routing.EndpointMiddleware : Executed endpoint 'MyCompany.Controllers.NewsEntityController.UpdateNewsEntity (dotnetcoresample)'
    2020-07-31 23:08:09.192 EROR 9764 --- [ 35] H.M.P.ProblemDetailsMiddleware : An unhandled exception has occurred while executing the request.
    Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
    at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ThrowAggregateUpdateConcurrencyException(Int32 commandIndex, Int32 expectedRowsAffected, Int32 rowsAffected)
    at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeResultSetWithoutPropagationAsync(Int32 commandIndex, RelationalDataReader reader, CancellationToken cancellationToken)
    at Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.ConsumeAsync(RelationalDataReader reader, CancellationToken cancellationToken)
    at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
    at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
    at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
    at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(DbContext _, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at MyCompany.Controllers.NewsEntityController.UpdateNewsEntity(NewsEntity newsEntity) in /Users/developer/Desktop/dotnetcoresample/src/Dotnetcoresample/Controllers/NewsEntityController.cs:line 64 at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>gAwaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
    --- End of stack trace from previous location where exception was thrown ---
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g
    Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Sc
    Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException
    nicolas63
    @nicolas63
    @manisi i have merge fix for compilation error with crosscuting.enums
    manisi
    @manisi
    @nicolas63 Thanks to you.
    nicolas63
    @nicolas63
    hello @manisi i have merge a fix for jhipster/jhipster-dotnetcore#321
    manisi
    @manisi
    @nicolas63 hello,thanks.
    @nicolas63 when use relationEntity (many-to-ont) the side of relationEntity if this relationEntity have a another relation ,this Error rise: {type: "https://httpstatuses.com/500", title: "Internal Server Error", status: 500,…}
    detail: "Unable to track an entity of type 'UserRole' because primary key property 'RoleId' is null."
    errors: [{,…}]
    status: 500
    title: "Internal Server Error"
    traceId: "|552f6b3-4f60584cc5bde46e."
    type: "https://httpstatuses.com/500"
    manisi
    @manisi
    @nicolas63 for example : relation to User (many-to -one) , in client Form if select "anonymoususer" form submit correctly and if you select another value (admin,user,system) form not submit. and if you want to edit this saved record , and select any related value this erorre rise.
    nicolas63
    @nicolas63
    hello @manisi I'm not sure to understand. You added the relationship to the user manually? Or is that just an example? How to reproduce on an entity?
    manisi
    @manisi

    @nicolas63 yes i added the relationship to user manually. (entity Sample {
    name String
    }
    relationship ManyToOne {
    Sample{user(login)} to User
    }

    dto Sample with mapstruct
    service Sample with serviceImpl)

    nicolas63
    @nicolas63
    @manisi can you open the issue ? I think this can fix your problem (jhipster/jhipster-dotnetcore#330). Can you try it ?
    Ivan Monteiro Cantalice
    @ivanmonteiro
    @nicolas63 I'm trying to use the extracted nuget package at the service PR (I needed to merge to fix conflicts)
    The JHipsterNet.Web is a .net core project, but I need to add it to domain/service projects (.net standard projects) because I actually need the references to Pageable, Page, etc.. contained at JHipsterNet.Web
    But get compiler error because it is not a .net standard project
    Is it possible to change it to .net standard?
    nicolas63
    @nicolas63
    Hello @ivanmonteiro yes we can do what but not on all nuget because page binder need asp.net core ( before we used to cheat this a .net core 2.x référence but we can't continue with this) i can put in JHipster.NET.core pageable
    nicolas63
    @nicolas63
    @ivanmonteiro done
    Ivan Monteiro Cantalice
    @ivanmonteiro

    @ivanmonteiro done

    thanks! :)

    Ivan Monteiro Cantalice
    @ivanmonteiro
    I'm not sure what to do about the JHipsterSettings file, it is currently at the web api project at Configuration folder
    But It is needed by service layer
    Not sure where to move it (infrastrucutre? corsscutt? domain? jhipster-net project/nuget ?)
    nicolas63
    @nicolas63
    Hello @ivanmonteiro, you can move it in infrastructure project
    nicolas63
    @nicolas63
    But why service need this ? The configuration is for web part no ?
    Ivan Monteiro Cantalice
    @ivanmonteiro

    But why service need this ? The configuration is for web part no ?

    Just MailService need this

    But can be removed
    It does not do anything useful with it yet
    public class MailService : IMailService {
        private readonly JHipsterSettings _jhipsterSettings;
    
        public MailService(IOptions<JHipsterSettings> jhipsterSettings)
        {
            _jhipsterSettings = jhipsterSettings.Value;
        }
    nicolas63
    @nicolas63
    Yes i think you can remove it. The email service will be implement in issue #16. ( maybe you can just comment constructor)