public void UpdateHomeAddress(EmployeeId id, Address homeAddress)
 {
     var employee = _data[id];
     _data[id] = new Employee(
         employee.Id,
         employee.Name,
         homeAddress,
         employee.Salary
         );
 }
示例#2
0
 public void UpdateHomeAddress(EmployeeId id, Address homeAddress)
 {
     var ro = RavenJObject.FromObject(homeAddress, _serializer);
     
     _store.DatabaseCommands.Patch($"employees/{id}", new[]
     {
         new PatchRequest
         {
             Type = PatchCommandType.Set,
             Name = "HomeAddress",
             Value = ro
         }
     });
 }