Beispiel #1
0
        public Response <int> Add(ChannelEntity input)
        {
            Response <ChannelEntity> validation = _queryChannelAggregate.Get(input.UserId, input.ChatId);

            if (validation.ResponseData != null)
            {
                return(Response <int> .Create(0, CDO.Enums.Response.ResponseType.AlreadyExist));
            }
            return(_commandChannelAggregate.Add(input));
        }
        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));
        }
 public Response <ChannelEntity> Get(int id)
 {
     return(_queryChannelAggregate.Get(id));
 }