mercredi 25 mai 2016

How to handle with data not IEntity?

How do you implement class for data received via the api , but at the same time non-IEntity? there is for example a method.

public async Task<IList<NewsSentimentIndexes>> getNewsSentimentIndexes(NewsRequest request)
    {
        var res = await _client.getList<NewsSentimentIndexes>(request);
        return res.Value;
    }

There are news entity and news service, but on it I get some data that do not have ID, so it is not Entity.respectively can no longer implement the IEntity interface for it, and use for NewsApiRepository. How to deal with such data?

Aucun commentaire:

Enregistrer un commentaire