Base solution for your next web application

Activities of "aaron"

The article shows how to call with "exec":

public async Task DeleteUser(EntityDto input)
{
    await Context.Database.ExecuteSqlCommandAsync(
        "EXEC DeleteUserById @id",
        default(CancellationToken),
        new SqlParameter("id", input.Id)
    );
}

Got page not found on:

Fixed the link - it was an uppercase S.

But, there they have used DataReader to read each value, I do not want to use that as it will deteriorate application performance. Is there better way to read whole data at once?

See:

Delete the bin folder in your Web project and rebuild the solution.

Hi @moustafa, Try making GetRecord "virtual".

Hi @JeromeVoxTeneo, Try making the internal method "protected virtual". Make sure the caller method disabled UnitOfWork.

Answer

Use dependency injection for AbpSession to be initialized properly.

public class StudentAppService : OKYSFastAppServiceBase, IStudentAppService
{
    private readonly IRepository<VStudentInfo> _StudentRepository;
    private readonly IPersonAppService _PersonAppService;

    public StudentAppService(
        IRepository<VStudentInfo> studentRepository,
        IPersonAppService personAppService)
        : base()
    {
        _StudentRepository = studentRepository;
        _PersonAppService = personAppService;
    }

    public async Task<ProcessResult> RegisterStudent(StudentInpuOutputDto input)
    {
        ProcessResult result = new ProcessResult(true);

        input.StudentPerson = await _PersonAppService.Insert(input.StudentPerson);
        input.Student.PersonId = input.StudentPerson.PersonId;
        input.Student = await Insert(input.Student);
        result.RecordID = input.Student.StudentId;
        return result;
    }
}

Read more in ABP documentation:

  • Dependency Injection: <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Dependency-Injection#DocConstructorInjection">https://aspnetboilerplate.com/Pages/Doc ... rInjection</a>

Do you mean you do a HTTP call in your desktop app, then launch browser and expect the browser to know you're logged in?

This uses IocManager.Instance, which is an IIocResolver, to resolve VehicleTrackingFieldAccessHtmlHandler like DI. ResolveAsDisposable returns IDisposableDependencyObjectWrapper, so ".Object" accesses your resolved "Handler". The disposable wrapper is assigned in a "using" statement to ensure that "Handler" is released to avoid memory leak.

Read more in ABP documentation:

  • Dependency Injection: <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Dependency-Injection#DocIocHelper">https://aspnetboilerplate.com/Pages/Doc ... cIocHelper</a>
Answer

Can you show actual code of how you inject and use PersonAppService in UserAppService?

Answer

Hi, can you show where you are doing that?

Showing 1531 to 1540 of 1543 entries