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

Activities of "jaylan"

Answer

<cite>ismcagdas: </cite> Hi @Jaylan,

For now, you can join _blogRepository.GetAll() and _blogPortsRepository.GetAll() using Linq query syntax. With EF Core 2.0, this problem will be solved I think.

Thanks.

Thanks.

Answer

<cite>alper: </cite> var countries = _blogRepository.GetAll().Include(c=> c.BlogPorts.Where(p=> !p.IsDeleted));

Hi, alper I have an exception.

Mvc.ExceptionHandling.AbpExceptionFilter - The property expression 'e => {from BlogPortss in [e].BlogPorts where Not([p].IsDeleted) select [p]}' is not valid. The expression should represent a property access: 't => t.MyProperty'. For more information on including related data, see <a class="postlink" href="http://go.microsoft.com/fwlink/?LinkID=746393">http://go.microsoft.com/fwlink/?LinkID=746393</a>. System.InvalidOperationException: The property expression 'e => {from BlogPorts s in [e].BlogPorts where Not([p].IsDeleted) select [p]}' is not valid. The expression should represent a property access: 't => t.MyProperty'. For more information on including related data, see <a class="postlink" href="http://go.microsoft.com/fwlink/?LinkID=746393">http://go.microsoft.com/fwlink/?LinkID=746393</a>. 在 Microsoft.EntityFrameworkCore.Query.ResultOperators.Internal.IncludeExpressionNode.CreateResultOperator(ClauseGenerationContext clauseGenerationContext) 在 Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase.ApplyNodeSpecificSemantics(QueryModel queryModel, ClauseGenerationContext clauseGenerationContext) 在 Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeBase.Apply(QueryModel queryModel, ClauseGenerationContext clauseGenerationContext) 在 Remotion.Linq.Parsing.Structure.QueryParser.ApplyAllNodes(IExpressionNode node, ClauseGenerationContext clauseGenerationContext) 在 Remotion.Linq.Parsing.Structure.QueryParser.ApplyAllNodes(IExpressionNode node, ClauseGenerationContext clauseGenerationContext) 在 Remotion.Linq.Parsing.Structure.QueryParser.GetParsedQuery(Expression expressionTreeRoot) 在 Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](Expression query, INodeTypeProvider nodeTypeProvider, IDatabase database, ILogger logger, Type contextType) 在 Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass19_01.<CompileQuery>b__0() 在 Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQueryCore[TFunc](Object cacheKey, Func1 compiler) 在 Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func1 compiler) 在 Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQuery[TResult](Expression query) 在 Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query) 在 Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression) 在 Remotion.Linq.QueryableBase1.GetEnumerator() 在 System.Collections.Generic.List1..ctor(IEnumerable1 collection) 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

Answer

<cite>alper: </cite> hi,

In Core version you need to manually handle soft delete filter on child entities. So what you have to filter BlogPorts in a new where condition.

Hi, alper

I don't quite understand. Can you give me an example?

thanks.

Answer

Hi, I don't quite understand. Can you give me an example?

Question

var countries = _blogRepository.GetAll().Include(c=> c.BlogPorts);

Problem: .Include(c=> c.BlogPorts) returning deleted (SoftDelete IsDeleted = 1) BlogPorts data also.

I use zero core 4.2

I didn't changed nswag DefaultEnumHandling to EnumHandling.String .I used the default service.config.nswag in our angular projecet .But the proxy generated enum not like yours.

why not generated enum like thiis:

export enum IsTenantAvailableOutputState {
    Available = 1, 
    InActive = 2, 
    NotFound = 3, 
}

then ,use like this .getTenants( IsTenantAvailableOutputState.Available );

I'm confused.

Why do I generate enum that are not the same as yours? Your:

export enum IsTenantAvailableOutputState {
    _1 = 1,
    _2 = 2,
    _3 = 3,
}

export enum FriendDtoState {
    _1 = 1,
    _2 = 2,
}

My:

export enum StudentDtoGender {
    Unknown = <any>"Unknown",
    Secrecy = <any>"Secrecy",
    Man = <any>"Man",
    Woman = <any>"Woman",
}

And another question, there is a appenums. ts file in the project, encapsulation of service-proxies enum, why not use enum directly?

export class AppTenantAvailabilityState {
    static Available: number = IsTenantAvailableOutputState._1;
    static InActive: number = IsTenantAvailableOutputState._2;
    static NotFound: number = IsTenantAvailableOutputState._3;
}

Thank you. Have a nice day.

Showing 1 to 8 of 8 entries