Exemplo n.º 1
0
 public IEnumerable <FieldType> GetFields()
 {
     yield return(Field <ClienteType>(
                      "createCliente",
                      arguments: new QueryArguments(
                          new QueryArgument <NonNullGraphType <ClienteInputType> > {
         Name = "cliente"
     }
                          ),
                      resolve: context =>
     {
         var cliente = context.GetArgument <Cliente>("cliente");
         return _locadouraDao.AddCliente(cliente);
     }));
 }
 public ActionResult <Cliente> PostTodoItem(Cliente cliente)
 {
     _locadoraDao.AddCliente(cliente);
     return(CreatedAtAction("GetCliente", new { id = cliente.Id }, cliente));
 }