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:
What will be best way to do so?
Also can I get the implementation?
Source code is published on Github: https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/StoredProcedureDemo
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.
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:
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:
Can you show actual code of how you inject and use PersonAppService in UserAppService?
Hi, can you show where you are doing that?