public BLResponse<Author> Get (GetAuthor request) { return Post (request); }
public BLResponse<Author> Post ( GetAuthor request) { return Controller.GetAuthor(request, BLRequest); }
public async Task <IActionResult> Get([FromRoute] GetAuthor query) => Select(await Dispatcher.QueryAsync(query));
public BLResponse<Author> GetAuthor(GetAuthor request, BLRequest blRequest){ return Client.Execute(proxy=>{ var u= Authors.FirstOrDefault(proxy, f=>f.Id==request.Id); if( u==default(Author)) throw new BLException("Author not found. Id:'{0}'".Fmt(request.Id)); var r = new BLResponse<Author>(); if(!IsCayita(blRequest)) r.Result.Add(u); else { var grid = BuildAuthorGrid(new List<Author>()); var dr =grid.CreateRow(u); r.Html= dr.ToString(); } return r; }); }
public async Task <Author> Handle(GetAuthor request, CancellationToken cancellationToken) => await AuthorEntityHandler.Get(request.Id);