Beispiel #1
0
        public override Task <Empty> UpdatePrisoner(PrisonerMessage request, ServerCallContext context)
        {
            Prisoner p = ConversionStuff.MessageToPrisoner(request);

            if (!ValidationUtility.IsPrisonerValid(p))
            {
                return(Task.FromResult(new Empty()));
            }
            unitOfWork.PrisonerRepo.Update(p);
            unitOfWork.Save();
            return(Task.FromResult(new Empty()));
        }