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);
}
Wonderful .... Thanks again :D
Im very thankful :D hopefully this will work