Ejemplo n.º 1
0
        public override Task <Empty> UpdateWorker(WorkerMessage request, ServerCallContext context)
        {
            Worker w = ConversionStuff.MessageToWorker(request);

            if (!ValidationUtility.IsWorkerValid(w))
            {
                return(Task.FromResult(new Empty()));
            }
            unitOfWork.WorkerRepo.Update(w);
            unitOfWork.Save();
            return(Task.FromResult(new Empty()));
        }