在ABP中使用OData时,如果只返回404错误的实体,可能是由于以下几个原因:
public void ConfigureServices(IServiceCollection services)
{
    // ...
    
    services.AddOData();
    
    // ...
}
public void Configure(IApplicationBuilder app)
{
    // ...
    
    app.UseEndpoints(endpoints =>
    {
        endpoints.MapControllers();
        endpoints.MapODataRoute("odata", "odata", GetEdmModel());
    });
    
    // ...
}
private static IEdmModel GetEdmModel()
{
    var builder = new ODataConventionModelBuilder();
    builder.EntitySet("YourEntities");
    return builder.GetEdmModel();
}
 public class YourEntity
{
    [Key]
    public int Id { get; set; }
    
    [Required]
    public string Name { get; set; }
    
    [NotMapped]
    [ODataIgnore]
    public string IgnoreProperty { get; set; }
}
/odata/YourEntities?$filter=Name eq 'Test'
如果以上解决方法都不能解决问题,请提供更多的代码示例和错误信息,以便更好地帮助你解决问题。