i am working on an asp.net mvc web application. and i have the following repository method,, where i will be passing the .Include() dynamically :-

   public async Task<SecurityRole> FindSecurityRole(int id,string path="")
              {
                  return await context.SecurityRoles.Include(path).SingleOrDefaultAsync(a2 => a2.SecurityRoleID == id);
}

now inside my controller i want to call the above method as follow:-

await uniteofwork.SecurityRoleRepository.FindSecurityRole(id.Value,)

but i am not sure what are the apporachies i can follow to pass the properties ? Thanks

Related posts

Recent Viewed