Exemplo n.º 1
0
		public BLResponse<Author> Get (GetAuthor request)
		{
			return Post (request);
		}
Exemplo n.º 2
0
		public BLResponse<Author> Post ( GetAuthor request)
		{
			return  Controller.GetAuthor(request, BLRequest);
		}
Exemplo n.º 3
0
 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;
			});
		}
Exemplo n.º 5
0
 public async Task <Author> Handle(GetAuthor request, CancellationToken cancellationToken) =>
 await AuthorEntityHandler.Get(request.Id);