Ejemplo n.º 1
0
        public async Task <ActionResult <Notify> > Create(NotifyDataDTO notify)
        {
            var result = await this.Mediator.Send(new CreateNotifyCommand
            {
                Data = notify
            });

            return(ResponseHelper.ResponseOutcome <Notify>(result, this));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> Update(int id, NotifyDataDTO notify)
        {
            var result = await this.Mediator.Send(new UpdateNotifyCommand
            {
                Id   = id,
                Data = notify
            });

            return(ResponseHelper.ResponseOutcome <Notify>(result, this));
        }
Ejemplo n.º 3
0
        public static Notify Map(this NotifyDataDTO dto) =>
        (dto != null) ? new Notify
        {
            CustomerId = dto.CustomerId ?? dto.CustomerId.Value,
            DateSent   = DateTime.Now,
            Email      = dto.Email,
            Retry      = dto.Retry ?? dto.Retry.Value,
            Sent       = dto.Sent ?? dto.Sent.Value,
        }

             : null;