Exemplo n.º 1
0
        public Task <Office> UpdateAsync(Office resource, IRequestContext context, CancellationToken cancellation)
        {
            var id = context.UriParameters.GetByName <int>("Id").EnsureValue(() => context.CreateHttpResponseException <Office>("The Id must be supplied in the URI", HttpStatusCode.BadRequest));

            return(Task.FromResult(_officeService.UpdateOffice(id, resource)));
        }