I have problem when I call GetById(id), it's return null instead of book. it should be return book that have the same id. there is no error but when I debug it show NullReference Exception" object reference not set to an instance of an object".
if any one can help me I will appreciate it. here is the code
public async void Save (Page p){
Book book = await GetById(p.id);
}
the error is on retrieving data from db, the GetById will retrieve object of type book but the problem here it is retrieve null.
public async Task<TEntity> GetById(long id){
return await _dbSet.FindAsync(id);
}