Exemple #1
0
        //Put New Staff Member
        public async Task <StaffDto> PutStaffAsync(StaffDto staff)
        {
            var response = await _client.PutAsJsonAsync("staffaccounts/" + staff.Id, staff);

            if (response.StatusCode == HttpStatusCode.NotFound)
            {
                return(null);
            }
            response.EnsureSuccessStatusCode();
            return(await response.Content.ReadAsAsync <StaffDto>());
        }
 Task <StaffDto> IStaffService.PutStaffAsync(StaffDto staff)
 {
     _staff.Add(staff);
     return(Task.FromResult(staff));
 }