Exemplo n.º 1
0
        public IActionResult Update([FromBody] Contact value, Guid id)
        {
            value.Id = id;

            return(new WebApiPut <Contact>(this, () => Manager.UpdateAsync(WebApiActionBase.Value(value)),
                                           operationType: OperationType.Update, statusCode: HttpStatusCode.OK, alternateStatusCode: null));
        }
Exemplo n.º 2
0
 public IActionResult Update([FromBody] Gender value, Guid id) =>
 new WebApiPut <Gender>(this, () => _manager.UpdateAsync(WebApiActionBase.Value(value), id),
                        operationType: OperationType.Update, statusCode: HttpStatusCode.OK, alternateStatusCode: null);
Exemplo n.º 3
0
 public IActionResult Create(Contact value)
 {
     return(new WebApiPost <Contact>(this, () => Manager.CreateAsync(WebApiActionBase.Value(value)),
                                     operationType: OperationType.Create, statusCode: HttpStatusCode.Created, alternateStatusCode: null));
 }
 public IActionResult Update([FromBody] PerformanceReview value, Guid id)
 {
     return(new WebApiPut <PerformanceReview>(this, () => _manager.UpdateAsync(WebApiActionBase.Value(value), id),
                                              operationType: OperationType.Update, statusCode: HttpStatusCode.OK, alternateStatusCode: null));
 }
Exemplo n.º 5
0
 public IActionResult Create([FromBody] Gender value) =>
 new WebApiPost <Gender>(this, () => _manager.CreateAsync(WebApiActionBase.Value(value)),
                         operationType: OperationType.Create, statusCode: HttpStatusCode.Created, alternateStatusCode: null);
Exemplo n.º 6
0
 public IActionResult Terminate([FromBody] TerminationDetail value, Guid id) =>
 new WebApiPost <Employee>(this, () => _manager.TerminateAsync(WebApiActionBase.Value(value), id),
                           operationType: OperationType.Update, statusCode: HttpStatusCode.OK, alternateStatusCode: null);
 public IActionResult Create([FromBody] PerformanceReview value, Guid employeeId)
 {
     return(new WebApiPost <PerformanceReview>(this, () => _manager.CreateAsync(WebApiActionBase.Value(value), employeeId),
                                               operationType: OperationType.Create, statusCode: HttpStatusCode.Created, alternateStatusCode: null));
 }
Exemplo n.º 8
0
 public IActionResult Update([FromBody] TripPerson value, string?id) =>
 new WebApiPut <TripPerson>(this, () => _manager.UpdateAsync(WebApiActionBase.Value(value), id),
                            operationType: OperationType.Update, statusCode: HttpStatusCode.OK, alternateStatusCode: null);
Exemplo n.º 9
0
 public IActionResult Update([FromBody] CustomerGroup value, string?id, string?company)
 {
     return(new WebApiPut <CustomerGroup>(this, () => Factory.Create <ICustomerGroupManager>().UpdateAsync(WebApiActionBase.Value(value), id, company),
                                          operationType: OperationType.Update, statusCode: HttpStatusCode.OK, alternateStatusCode: null));
 }
Exemplo n.º 10
0
 public IActionResult Create([FromBody] PerformanceReview value, Guid employeeId) =>
 new WebApiPost <PerformanceReview>(this, () => _manager.CreateAsync(WebApiActionBase.Value(value), employeeId),
                                    operationType: OperationType.Create, statusCode: HttpStatusCode.Created, alternateStatusCode: null, locationUri: (r) => new Uri($"/api/v1/reviews/{r.Id}", UriKind.Relative));
Exemplo n.º 11
0
 public IActionResult Create([FromBody] Person value)
 {
     return(new WebApiPost <Person>(this, () => _manager.CreateAsync(WebApiActionBase.Value(value)),
                                    operationType: OperationType.Create, statusCode: HttpStatusCode.Created, alternateStatusCode: null));
 }
Exemplo n.º 12
0
 public IActionResult UpdateWithRollback([FromBody] Person value, Guid id) =>
 new WebApiPut <Person>(this, () => _manager.UpdateWithRollbackAsync(WebApiActionBase.Value(value), id),
                        operationType: OperationType.Update, statusCode: HttpStatusCode.OK, alternateStatusCode: null);
Exemplo n.º 13
0
 public IActionResult Create([FromBody] Person value) =>
 new WebApiPost <Person>(this, () => _manager.CreateAsync(WebApiActionBase.Value(value)),
                         operationType: OperationType.Create, statusCode: HttpStatusCode.Created, alternateStatusCode: null, locationUri: (r) => new Uri($"/api/v1/persons/{r.Id}", UriKind.Relative));
Exemplo n.º 14
0
 public IActionResult EventPublishNoSend([FromBody] Person value) =>
 new WebApiPut <Person>(this, () => _manager.EventPublishNoSendAsync(WebApiActionBase.Value(value)),
                        operationType: OperationType.Update, statusCode: HttpStatusCode.OK, alternateStatusCode: null);
Exemplo n.º 15
0
 public IActionResult CreateWithEf([FromBody] Person value)
 {
     return(new WebApiPost <Person>(this, () => Factory.Create <IPersonManager>().CreateWithEfAsync(WebApiActionBase.Value(value)),
                                    operationType: OperationType.Create, statusCode: HttpStatusCode.Created, alternateStatusCode: null));
 }
Exemplo n.º 16
0
 public IActionResult Create([FromBody] Robot value)
 {
     return(new WebApiPost <Robot>(this, () => Factory.Create <IRobotManager>().CreateAsync(WebApiActionBase.Value(value)),
                                   operationType: OperationType.Create, statusCode: HttpStatusCode.Created, alternateStatusCode: null));
 }
Exemplo n.º 17
0
 public IActionResult Update([FromBody] Person value, Guid id)
 {
     return(new WebApiPut <Person>(this, () => Factory.Create <IPersonManager>().UpdateAsync(WebApiActionBase.Value(value), id),
                                   operationType: OperationType.Update, statusCode: HttpStatusCode.OK, alternateStatusCode: null));
 }
Exemplo n.º 18
0
 public IActionResult UpdatePostCodes([FromBody] PostalInfo value, string?country, string?state, string?city) =>
 new WebApiPut <PostalInfo>(this, value, () => _manager.GetPostCodesAsync(country, state, city), () => _manager.UpdatePostCodesAsync(WebApiActionBase.Value(value), country, state, city),
                            operationType: OperationType.Update, statusCode: HttpStatusCode.OK, alternateStatusCode: null);