public async ValueTask <PersonalDataGrpcResponseContract> GetByEmail(string email) { var pd = await ServiceLocator.PersonalDataRepository.GetByIdAsync(email, ServiceLocator.EncodingKey); var response = new PersonalDataGrpcResponseContract(); if (pd != null) { response.PersonalData = pd.ToGrpcModel(); } return(response); }
public async ValueTask <PersonalDataGrpcResponseContract> GetByIdAsync(string id) { Console.WriteLine("Requesting data by ID: " + id); var pd = await ServiceLocator.PersonalDataRepository.GetByIdAsync(id, ServiceLocator.EncodingKey); var response = new PersonalDataGrpcResponseContract(); if (pd != null) { response.PersonalData = pd.ToGrpcModel(); } return(response); }