public Response <int> Add(RssChatRelationEntity input, string name)
        {
            Response <ChannelEntity> response = _queryChannelAggregate.Get(input.UserId, name);

            input.ChatId = response.ResponseData.ChatId;
            input.Name   = name;
            Response <RssChatRelationEntity> validation = _queryRssChatAggregate.Get(input.UserId, input.ChatId, input.Url);

            if (validation.ResponseData != null)
            {
                return(Response <int> .Create(0, CDO.Enums.Response.ResponseType.AlreadyExist));
            }
            return(_commandRssChatAggregate.Add(input));
        }
Example #2
0
 public Response <RssChatRelationEntity> Get(int id)
 {
     return(_queryQueryAggregate.Get(id));
 }