Esempio 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));
        }
Esempio 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);
Esempio 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));
 }
Esempio 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);
Esempio 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));
 }
Esempio 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);
Esempio 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));
 }
Esempio 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));
Esempio 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));
 }
Esempio 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);
Esempio 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));
Esempio 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);
Esempio 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));
 }
Esempio 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));
 }
Esempio 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));
 }
Esempio 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);