Hello All;
My Project structure like this
In my test app
private readonly IEmpRepository _EmpRepository;
//Constructor
public UnitTestClass()
{
_EmpRepository = LocalIocManager.Resolve<IEmpRepository>();
}
[TestMethod]
public void Should_Add_Employee_With_Authorized_User()
{
var result = _EmpRepository.GetAllWithDepartment(1);
result.Count().ShouldBe(100);
}
Thank you :)
Thank you
I use this:
public IEnumerable<Employee> GetAllWithDepartment(int? deptID)
{
var departmentIDParameter = deptID != null ?
new SqlParameter("@dept_id", deptID) :
new SqlParameter("@dept_id", typeof (int));
return Context.Database.SqlQuery<Employee>("spGetEmployeesWithUsersWithDepartments @dept_id", departmentIDParameter);
}
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;
Wonderful .... Thanks again :D
Im very thankful :D hopefully this will work
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.... :(