Beispiel #1
0
        public async Task <object> EmailRead([FromBody] EmailViewModel emailViewModel)
        {
            bool   result = true;
            string error  = string.Empty;

            EmailViewModel email = new EmailViewModel();

            try
            {
                email = _emailRepository.EmailRead(emailViewModel.EmailId);
            }
            catch (Exception ex)
            {
                result = false;
                error  = ex.Message;
            }

            return(new SingleResponse <EmailViewModel>
            {
                Message = error,
                DidError = !result,
                ErrorMessage = error,
                Token = string.Empty,
                Model = email,
            });
        }