Base solution for your next web application

Activities of "TimMackey"

There's nothing about AddPhone or DeletePhone "included in the previous post".

Actually if you give it a read again there is code starting at the 3rd line, and it is how I implemented the constructor of PersonAppService, My apologies for not using the code tags to highlight it. But that is beside the main points, which I will get to in a moment. It does appear that I have implemented it correctly. Thank you for correcting the instructions.

Also, it was my intent to reference a section in the developer instructions page... [https://aspnetzero.com/Documents/Developing-Step-By-Step-Angular#creating-a-new-person]) ...when I said "Acme.PhoneBookDemo-Angular, "AddPhone and DeletePhone Methods" section..." - I was not referring to the AddPhone or DeletePhone methods.

In the same page at section "Creating Person Application Service" the instructions say... "Application service interface and DTOs are located in .Application.Shared project." This makes sense given most other DTOs are located in the project. However, going to the github repository ... [https://github.com/aspnetzero/aspnet-zero-samples/tree/master/PhoneBook-Angular]) ... to double check my implementation I discover that the application service interface and DTO folder are in the .Application project.

My questions are:

  1. Could this be why my code does not pass Tests?
  2. Which is the correct project to implement the interface; .Application or .Application.Shared?
  3. Why does the github repository has version 5.0.0 code and the code generator emit version 5.3.0 code? There are 102 text files with differences between versions. This makes code checking difficult.
  4. Why are Dto folders for Configuration, Install, and MultiTenancy in the .Application project? This breaks the pattern of most Dto folders being located in the .Application.Shared project.

I have double checked all my code, and as best as I can follow the instructions, I believe I have implemented the code correctly. I remain baffled why it will not pass all Tests.

I've attached the related projects in a zip file if you care to investigate into which folders are the files I implemented the code in, and if the code is correct. Thank you for your assistance. PhoneBookDemo.src.zip

First of all, please note that I corrected the title.

To your point to double check all the steps...

The instructions are a bit cryptic at this point, i.e. "(Note: We injected IRepository<Phone, long> in the constructor and set to _personRepository field, as similar to _personRepository)"

I included in the previous post the code that I wrote so that someone could verify if it follows the above instruction. Please refer to the attached .zip file for the changed code. Thank you. AddPhone-and-DeletePhone-Method-Error.zip

I look forward to its release.

@vladsd: I'm so happy they work for you! I too get notifications with valid links! My ability to report bugs and receive notifications is indicative of having an account, and I don't need to be logged into the forum to receive email. Below is the raw email text. I'm submitting this issue as a bug in the forum notification system.

Hello TimMackey,

You are receiving this notification because you are watching the forum, "ASP.NET Zero Support" at "ASP.NET Boilerplate - Web Application Framework". This forum has received a new topic by sunilkosuri since your last visit, "ForeignKey - Migration". You can use the following link to view the forum, no more notifications will be sent until you visit the forum.

<a class="postlink-local" href="https://forum.aspnetboilerplate.com/viewforum.php?f=5">viewforum.php?f=5</a>

If you no longer wish to watch this forum you can either click the "Unsubscribe forum" link found in the forum above, or by clicking the following link:

<a class="postlink-local" href="https://forum.aspnetboilerplate.com/viewforum.php?uid=27157&f=5&unwatch=forum">viewforum.php?uid=27157&f=5&unwatch=forum</a>

Acme.PhoneBookDemo-Angular, "AddPhone and DeletePhone Methods" section... When implementing changes as specified, plus per explanation this:

[AbpAuthorize(AppPermissions.Pages_Tenant_PhoneBook)]
public class PersonAppService : PhoneBookDemoAppServiceBase, IPersonAppService
{
    private readonly IRepository&lt;Person&gt; _personRepository;
    private readonly IRepository&lt;Phone, long&gt; _phoneRepository;

    public PersonAppService(IRepository&lt;Person&gt; personRepository,
                            IRepository&lt;Phone, long&gt; phoneRepository)
    {
        _personRepository = personRepository;
        _phoneRepository = phoneRepository;
    }
    ...
}

...two Tests fail:

Test Name: PhoneBookDemo.Tests.People.PersonAppService_Tests.Should_Get_All_People_Without_Any_Filter Test FullName: PhoneBookDemo.Tests.People.PersonAppService_Tests.Should_Get_All_People_Without_Any_Filter Test Source: C:\PhoneBookDemo\PhoneBookDemo\aspnet-core\test\PhoneBookDemo.Tests\People\PersonAppService_Tests.cs : line 21 Test Outcome: Failed Test Duration: 0:00:03.093

Result StackTrace: at AutoMapper.Mapper.get_Instance() at AutoMapper.Mapper.Map[TDestination](Object source) at Abp.AutoMapper.AutoMapExtensions.MapTo[TDestination](Object source) at PhoneBookDemo.Persons.PersonAppService.GetPeople(GetPeopleInput input) at Castle.Proxies.PersonAppServiceProxy.GetPeople_callback(GetPeopleInput input) at Castle.Proxies.Invocations.IPersonAppService_GetPeople.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Authorization.AuthorizationInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformUow(IInvocation invocation, UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Auditing.AuditingInterceptor.PerformSyncAuditing(IInvocation invocation, AuditInfo auditInfo) at Abp.Auditing.AuditingInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Runtime.Validation.Interception.ValidationInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.PersonAppServiceProxy.GetPeople(GetPeopleInput input) at PhoneBookDemo.Tests.People.PersonAppService_Tests.Should_Get_All_People_Without_Any_Filter() Result Message: System.InvalidOperationException : Mapper not initialized. Call Initialize with appropriate configuration. If you are trying to use mapper instances through a container or otherwise, make sure you do not have any calls to the static Mapper.Map methods, and if you're using ProjectTo or UseAsDataSource extension methods, make sure you pass in the appropriate IConfigurationProvider instance.

...and...

Test Name: PhoneBookDemo.Tests.People.PersonAppService_Tests.Should_Get_People_With_Filter Test FullName: PhoneBookDemo.Tests.People.PersonAppService_Tests.Should_Get_People_With_Filter Test Source: C:\PhoneBookDemo\PhoneBookDemo\aspnet-core\test\PhoneBookDemo.Tests\People\PersonAppService_Tests.cs : line 31 Test Outcome: Failed Test Duration: 0:00:07.733

Result StackTrace: at AutoMapper.Mapper.get_Instance() at AutoMapper.Mapper.Map[TDestination](Object source) at Abp.AutoMapper.AutoMapExtensions.MapTo[TDestination](Object source) at PhoneBookDemo.Persons.PersonAppService.GetPeople(GetPeopleInput input) at Castle.Proxies.PersonAppServiceProxy.GetPeople_callback(GetPeopleInput input) at Castle.Proxies.Invocations.IPersonAppService_GetPeople.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Authorization.AuthorizationInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformUow(IInvocation invocation, UnitOfWorkOptions options) at Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Auditing.AuditingInterceptor.PerformSyncAuditing(IInvocation invocation, AuditInfo auditInfo) at Abp.Auditing.AuditingInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Runtime.Validation.Interception.ValidationInterceptor.Intercept(IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.PersonAppServiceProxy.GetPeople(GetPeopleInput input) at PhoneBookDemo.Tests.People.PersonAppService_Tests.Should_Get_People_With_Filter() Result Message: System.InvalidOperationException : Mapper not initialized. Call Initialize with appropriate configuration. If you are trying to use mapper instances through a container or otherwise, make sure you do not have any calls to the static Mapper.Map methods, and if you're using ProjectTo or UseAsDataSource extension methods, make sure you pass in the appropriate IConfigurationProvider instance.

When I receive email notifications of topic updates for topic "ENTITY HISTORY TRACKING", here: #4931@bd177136-748c-4cbd-8be0-f408aba885b9 or topic "RADTOOLS DATABASE SAME TABLE MODIFY", here: #4929@427be0e5-545d-42e6-8f47-5989292fdcff or topic "FOREIGNKEY - MIGRATION", here: #4927@8476ee1e-d090-465d-bc7d-a4f619a44125

the link in email is incomplete, always the same: <a class="postlink-local" href="https://forum.aspnetboilerplate.com/viewforum.php?f=5">viewforum.php?f=5</a>

The code you referenced is correct. I used the (erroneous) code posted at <a class="postlink" href="https://aspnetzero.com/Documents/Developing-Step-By-Step-Angular">https://aspnetzero.com/Documents/Develo ... ep-Angular</a>

<input [(ngModel)]="filterText" name="filter" autoFocus class="form-control m-input" [placeholder]="l('SearchWithThreeDot')" type="text">

fyi... I have noticed many other errors and omissions in the instructions, but have been able to eventually figure it out in most cases.

That is the solution! Thank you!

Acme.PhoneBookDemo-Angular: new component "People", Filtering People does not work as specified.

In 'phonebook.component.ts' export class PhoneBookComponent extends AppComponentBase implements OnInit {...} required changing 'filter: string = '';' to 'filterText = '';' because 'phonebook.component.html' specifies '<input [(ngModel)]="filterText" ...>'

If this is not the correct implementation, please advise. Thank you.

Yes, PhoneBook-Angular solution, version 5.3.0.

When I execute the Test the following error occurs:

Test Name: PhoneBookDemo.Tests.People.PersonAppService_Tests.Should_Create_Person_With_Valid_Arguments Test FullName: PhoneBookDemo.Tests.People.PersonAppService_Tests.Should_Create_Person_With_Valid_Arguments Test Source: C:\PhoneBookDemo\PhoneBookDemo\aspnet-core\test\PhoneBookDemo.Tests\People\PersonAppService_Tests.cs : line 50 Test Outcome: Failed Test Duration: 0:00:07.944

Result StackTrace: at lambda_method(Closure , CreatePersonInput , Person , ResolutionContext ) at lambda_method(Closure , Object , Object , ResolutionContext ) at Abp.AutoMapper.AutoMapperObjectMapper.Map[TDestination](Object source) at PhoneBookDemo.Persons.PersonAppService.<CreatePerson>d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinally>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithFinally>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at PhoneBookDemo.Tests.People.PersonAppService_Tests.<Should_Create_Person_With_Valid_Arguments>d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Result Message: AutoMapper.AutoMapperConfigurationException : Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters

CreatePersonInput -> Person (Destination member list) PhoneBookDemo.PhoneBook.CreatePersonInput -> PhoneBookDemo.PhoneBook.Person (Destination member list)

Unmapped properties: IsDeleted DeleterUserId DeletionTime LastModificationTime LastModifierUserId CreationTime CreatorUserId Id

Showing 341 to 350 of 398 entries