Hello,
In a DbRepository, I am trying to get a specific column. Here is the code :
public class PersonRepository : DbRepository<SqlConnection>, IPersonRepository
{
public PersonRepository()
: base(ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString)
{ }
public string GetName(int personId)
{
var field = Field.Parse<Person>(e => new
{
e.Name,
});
return Query<Person>(f => f.PersonId == personId, fields: field).FirstOrDefault();
}
}
The "fields" param is not implemented apparently... But how can I achieve this?
Sorry, but the documentation didn't really help me for that...
Thanks for your help
Hello,
In a DbRepository, I am trying to get a specific column. Here is the code :
The "fields" param is not implemented apparently... But how can I achieve this?
Sorry, but the documentation didn't really help me for that...
Thanks for your help