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

Activities of "troyfernando"

Which line of code is EstimateSubPortionsAppService.cs:line 79? previous solution

var pagedAndFilteredEstimateSubPortions = await filteredEstimateSubPortions
    .OrderBy(input.Sorting ?? "id asc")
    .PageBy(input)
    .ToListAsync();
    ```
it has error

ok

public async Task<PagedResultDto<GetEstimateSubPortionForViewDto>> GetAll(GetAllEstimateSubPortionsInput input)
         {
            try
            {
                var filteredEstimateSubPortions = _estimateSubPortionRepository.GetAll()
                            .WhereIf(input.MinEstimateHdIdFilter != null, e => e.EstimateHdId == input.MinEstimateHdIdFilter)
                            .WhereIf(input.MinPortionIdFilter != null, e => e.PortionId == input.MinPortionIdFilter)
                            .WhereIf(input.MinItemNoFilter != null, e => e.ItemNo == input.MinItemNoFilter)
                             ;

                var pagedAndFilteredEstimateSubPortions = await filteredEstimateSubPortions
                    .OrderBy(input.Sorting ?? "id asc")
                    .PageBy(input).ToListAsync();

                var estimateSubPortions = from o in pagedAndFilteredEstimateSubPortions
                                          select new GetEstimateSubPortionForViewDto()
                                          {
                                              EstimateSubPortion = new EstimateSubPortionDto
                                              {
                                                  EstimateHdId = o.EstimateHdId,
                                                  PortionId = o.PortionId,
                                                  ItemNo = o.ItemNo,
                                                  SubPortDesc = o.SubPortDesc,
                                                  Area = o.Area,
                                                  TotalMaterials = o.TotalMaterials,
                                                  TotalLabor = o.TotalLabor,
                                                  TotalOthMat = o.TotalOthMat,
                                                  Id = o.Id
                                              }
                                          };

                var totalCount = await filteredEstimateSubPortions.CountAsync();

                return new PagedResultDto<GetEstimateSubPortionForViewDto>(
                    totalCount,
                    estimateSubPortions.ToList()
                );
            }catch(Exception err)
            {
                throw new UserFriendlyException(err.Message);
            }
         }
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression.set_IsProjectStar(Boolean value)
at Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression.PushDownSubquery()
at Microsoft.EntityFrameworkCore.SqlServer.Query.Sql.Internal.SqlServerQuerySqlGenerator.RowNumberPagingExpressionVisitor.VisitSelectExpression(SelectExpression selectExpression)
at Microsoft.EntityFrameworkCore.SqlServer.Query.Sql.Internal.SqlServerQuerySqlGenerator.RowNumberPagingExpressionVisitor.Visit(Expression expression)
at Microsoft.EntityFrameworkCore.SqlServer.Query.Sql.Internal.SqlServerQuerySqlGeneratorFactory.CreateDefault(SelectExpression selectExpression)
at Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression.CreateDefaultQuerySqlGenerator()
at Microsoft.EntityFrameworkCore.Query.Internal.ShaperCommandContext.GetRelationalCommand(IReadOnlyDictionary`2 parameters) at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.BufferlessMoveNext(DbContext _, Boolean buffer, CancellationToken cancellationToken)_
_at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)_
_at Microsoft.EntityFrameworkCore.Query.Internal.AsyncQueryingEnumerable`1.AsyncEnumerator.MoveNext(CancellationToken cancellationToken) at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator`2.MoveNextCore(CancellationToken cancellationToken) in D:\a\1\s\Ix.NET\Source\System.Interactive.Async\Select.cs:line 106_
_at System.Linq.AsyncEnumerable.AsyncIterator`1.MoveNext(CancellationToken cancellationToken) in D:\a\1\s\Ix.NET\Source\System.Interactive.Async\AsyncIterator.cs:line 98 at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext(CancellationToken cancellationToken)_
_at System.Linq.AsyncEnumerable.Aggregate_[TSource,TAccumulate,TResult](IAsyncEnumerable`1 source, TAccumulate seed, Func`3 accumulator, Func`2 resultSelector, CancellationToken cancellationToken) in D:\a\1\s\Ix.NET\Source\System.Interactive.Async\Aggregate.cs:line 120
at DNEthan.Estimates.EstimateSubPortionsAppService.GetAll(GetAllEstimateSubPortionsInput input) in C:\Users\RJ\Downloads\DNEthanZero\DNEthan6\src\DNEthan.Application\Estimates\EstimateSubPortionsAppService.cs:line 79

Error : Index was outside the bounds of the array.

Error : Destination array was not long enough. Check the destination index, length, and the array's lower bounds. Parameter name: destinationArray

totalCount returns a value and still has error

public async Task<PagedResultDto<GetEstimateSubPortionForViewDto>> GetAll(GetAllEstimateSubPortionsInput input)
         {
            try
            {
                var filteredEstimateSubPortions = _estimateSubPortionRepository.GetAll()
                            .WhereIf(input.MinEstimateHdIdFilter != null, e => e.EstimateHdId == input.MinEstimateHdIdFilter)
                            .WhereIf(input.MinPortionIdFilter != null, e => e.PortionId == input.MinPortionIdFilter)
                            .WhereIf(input.MinItemNoFilter != null, e => e.ItemNo == input.MinItemNoFilter)
                             ;

                var pagedAndFilteredEstimateSubPortions = filteredEstimateSubPortions
                    .OrderBy(input.Sorting ?? "id asc")
                    .PageBy(input);

                var estimateSubPortions = from o in pagedAndFilteredEstimateSubPortions
                                          select new GetEstimateSubPortionForViewDto()
                                          {
                                              EstimateSubPortion = new EstimateSubPortionDto
                                              {
                                                  EstimateHdId = o.EstimateHdId,
                                                  PortionId = o.PortionId,
                                                  ItemNo = o.ItemNo,
                                                  SubPortDesc = o.SubPortDesc,
                                                  Area = o.Area,
                                                  TotalMaterials = o.TotalMaterials,
                                                  TotalLabor = o.TotalLabor,
                                                  TotalOthMat = o.TotalOthMat,
                                                  Id = o.Id
                                              }
                                          };

                var totalCount = await filteredEstimateSubPortions.CountAsync();

                return new PagedResultDto<GetEstimateSubPortionForViewDto>(
                    totalCount,
                    await estimateSubPortions.ToListAsync()
                );
            }catch(Exception err)
            {
                throw new UserFriendlyException(err.Message);
            }
         }

found this

ng build --prod --build-optimizer false --aot false

seems to be faster takes only 1 - 2 minutes to build

ng build --prod

done deleting and install npm still it takes me 10-15 minutes to build

Intel I7 32GB RAM

thanx

Showing 11 to 20 of 32 entries