开发者

Repository or Business logic concern?

My service method is receiving a message as parameter. This message has same props. This props are used to build a filter for a query. There could be used some logic.

The code which is setting up the filter may looks like this

var filter = new QueryFilter()

var predicate = new Predicate()

if(message.Param1 == 1)
{
 开发者_开发问答   predicate .Param1 == message.Param2 + 5;
}

filer.Addpredicate(predicate);

My question is,should be this code in the repository or is this a bussines logic concern ?


It shouldn't matter that much, but since you have the word "query", which is mostly storage-related, I'd say - the repository

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜