Hello everybody:
i'm trying to execute a stored procedure in my app , i'm using (Module Zero) but i facing issue with (Create Query & Session)
Here is my code
public interface IEmpRepository : IRepository<Employee>
{
List<Employee> GetAllWithDepartment(int? deptID);
}
public class EmpRepository : EmployeesTasksRepositoryBase<Employee, int>, IEmpRepository
{
public EmpRepository(IDbContextProvider<EmployeesTasksDbContext> dbContextProvider)
: base(dbContextProvider)
{
}
public List<Employee> GetAllWithDepartment(int? deptID)
{
var query = Abp.Runtime.Session
.CreateQuery("spGetEmployeesWithUsersWithDepartments")
.SetParameter("deptId", deptID);
}
}
Thank you all;
Hi All;
I'm so interested to use this framework in all my next project , so i download the template from the site
i trying to add Console app to "SimpleTaskSystem" but always i face the same problem
<span style="color:#FF0000">The Error</span> An unhandled exception of type 'Castle.MicroKernel.ComponentNotFoundException' occurred in Castle.Windsor.dll
Additional information: No component for supporting the service SimpleTaskSystem.ConsoleApp.testClass was found
<span style="color:#FF0000">The Code</span>
namespace SimpleTaskSystem.ConsoleApp
{
public class Program
{
static void Main(string[] args)
{
using (var bootstrapper = new AbpBootstrapper())
{
bootstrapper.Initialize();
var tester = IocManager.Instance.Resolve<testClass>();
tester.LoadAllPeopleAsync();
Console.ReadLine();
}
}
}
public partial class testClass
{
private readonly IPersonAppService _personAppService;
public testClass(IPersonAppService personAppService)
{
_personAppService = personAppService;
}
public async void LoadAllPeopleAsync()
{
var result = await _personAppService.GetAllPeople();
foreach (var person in result.People)
{
Console.WriteLine(person.Name);
}
}
}
}
Is there any thing to do with this issue.... :(