示例#1
0
        public async Task PutFace(FaceDto faceDto)
        {
            var face = await _context.Faces.FindAsync(faceDto.Id);

            face.PersonId = faceDto.PersonId;
            _context.Entry(face).State = EntityState.Modified;
            await _context.SaveChangesAsync();
        }
        public async Task PutPerson(PersonDto personDto)
        {
            var person = await _context.People.FindAsync(personDto.Id);

            person.Name                  = personDto.Name;
            person.Surname               = personDto.Surname;
            person.MiddleName            = personDto.MiddleName;
            _context.Entry(person).State = EntityState.Modified;
            await _context.SaveChangesAsync();
        }