Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "system15"

I have an error message with the same code from the aspnet zero documention step by step development guide. The error that I get is :

Expected 4 arguments but got 1.

Does anyone know how to resolve this ? show(personId): void { this.active = true; this._personService.getPersonForEdit(personId).subscribe((result) => { this.person = result; this.modal.show(); }); }

file: edit-person-modal.component.ts link to docs: [https://www.aspnetzero.com/Documents/Developing-Step-By-Step-Angular]

I'm using SQLServer. I have created a custom mapper but it still doesn't work. I still get the error message Specified cast is not valid. Is there any other ideas that I can try. I am simply following the documentation for the phonebook component.

Reference: https://www.aspnetzero.com/Documents/Developing-Step-By-Step-Angular Section that I'm getting an issue with: CHANGING GETPEOPLE METHOD.

System.InvalidCastException
  HResult=0x80004002
  Message=Specified cast is not valid.
  Source=Microsoft.EntityFrameworkCore.Relational
  StackTrace:
   at Microsoft.EntityFrameworkCore.Storage.Internal.UntypedRelationalValueBufferFactory.Create(DbDataReader dataReader)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(Boolean buffer)
   at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.&lt;&gt;c__DisplayClass12_0`2.<Execute>b__0(DbContext c, TState s)
   at Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.Execute[TState,TResult](IExecutionStrategy strategy, Func`2 operation, Func`2 verifySucceeded, TState state)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryBuffer.IncludeCollection(Int32 includeId, INavigation navigation, INavigation inverseNavigation, IEntityType targetEntityType, IClrCollectionAccessor clrCollectionAccessor, IClrPropertySetter inverseClrPropertySetter, Boolean tracking, Object entity, Func`1 relatedEntitiesFactory)
   at Microsoft.EntityFrameworkCore.Query.Internal.IncludeCompiler._Include[TEntity](QueryContext queryContext, TEntity entity, Object[] included, Action`3 fixup)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.<_TrackEntities>d__17`2.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at DentsplyDemoNg5.PhoneBook.PersonService.GetPeople(GetPeopleInput input) in C:\Users\x\Documents\DentsplyDemoNg5\src\DentsplyDemoNg5.Application\PhoneBook\PersonService.cs:line 39
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.&lt;InvokeActionMethodAsync&gt;d__12.MoveNext()

Following the asp.net zero documentation step by step guide I have an issue getting the following code snippet to work

public ListResultDto<PersonListDto> GetPeople(GetPeopleInput input)
        {
                var allPersons = _personRepository
                .GetAll()
                .Include(p => p.Phones)
                .OrderBy(p => p.Name)
                .ThenBy(p => p.Surname)
                .ToList();

                return new ListResultDto<PersonListDto>(ObjectMapper.Map<List<PersonListDto>>(allPersons));
        }

I've added this line of code to the CustomDtoMapper.cs

//Phone
            configuration.CreateMap<Phone, PhoneInPersonListDto>();

I get the error message when I try to use the GetPeople method.: "System.InvalidCastException: 'Specified cast is not valid.'" and I don't know how to resolve the issue. Any help would be much appreciated.

I want to completely remove the entity from the project first is this possible?

I want to generate another entity with the same name using asp.net power tool. Is there an easier way of doing this method without deleting the mulitple folders and files across the project as this seems to be a tedious process. If anyone knows an easier way please let me know.

Thanks

Hi there when I press the IIS Express button with visual studio the browser loads with the url <a class="postlink" href="http://localhost:22742/">http://localhost:22742/</a> how do I get it to load with <a class="postlink" href="http://localhost:22742/swagger/">http://localhost:22742/swagger/</a> so I don't need to type /swagger each time I run it?

Thanks in advance

Hi there, When I create an entity using the ASP.NET Zero Power Tool. In the EntityNameExcelExporter.cs file the following is being auto generated:

public EntityNameExcelExporter(
            ITimeZoneConverter timeZoneConverter,
            IAbpSession abpSession,
            ICacheManager cacheManager) : base(cacheManager)
        {
            _timeZoneConverter = timeZoneConverter;
            _abpSession = abpSession;
        }

The using Abp.Runtime.Caching is added to the file and the word base is underlined in red. As a result the solution won't build I have created other entites using the power tool and I'm not familiar with this happening. Does anyone know how to resolve this or can I just simply delete it?

Hi there the link provided doesn't work.

Hi there I have a dropdown button that doesn't disappear when clicked and navigated to a new page. I'm using asp.net zero with a angular5 frontend and bootstrap 4.

Here is the code:

some.component.html

<div class="btn-group dropdown" normalizePosition ng-click="toggle()">
<button class="dropdown-toggle btn btn-sm btn-primary"
        data-toggle="dropdown"
        aria-haspopup="true"
        aria-expanded="false">
    <i class="fa fa-cog"></i><span class="caret"></span> {{l("Edit")}}
</button>
<ul class="dropdown-menu">
    <li>
        <a (click)="openReport(id)">{{l('Run Report')}}</a>
    </li>
</ul>

some.component.ts

openReport(id): void {
    this.router.navigate(['/app/main/report/viewer', id]);
}

When you are navigated to the report viewer page in the browser the button is still showing and I'm not sure how to remove this after it's been clicked. Does anyone have ideas?

Showing 31 to 40 of 49 entries