Hi,
I am getting into DAL2 and really enjoying it but I have come across a roadblock. I would like to take advantage of the built in getbyid method however it seems (and my knowledge is still limited) that the accepted parameters for the method is limited to either the primary or the column defined as "scope" . Does this suggest that there are only two possibilities to hook up the data? Is there any way to make this more flexible by defining the scope on the fly or something to that extent?
The following does return (I think) because I have the scope and the primary key defined as something else
public int getPermissionTypeId(string PermissionTypeName)
{
int permissionId;
using (IDataContext ctx = DataContext.Instance())
{
var rep = ctx.GetRepository<
PermissionType
>();
permissionId = rep.GetById(PermissionTypeName);
}
return permissionId;
}