Пример #1
0
        /// <summary>
        /// get params for recipient, needed for an update view
        /// </summary>
        /// <param name="dtoModel"></param>
        /// <returns></returns>
        public async Task <RecipientParamsDtoModel> GetRecipientParamsForUpdateAsync(RecipientUpdateOutputDtoModel dtoModel)
        {
            var modelForUpdate = await this.recipients.All().FirstOrDefaultAsync(x => x.Id == dtoModel.RecipientId);

            var paramsModel = RecipientParamsDtoMapper.Map(modelForUpdate);

            return(paramsModel);
        }
Пример #2
0
        public static RecipientUpdateOutputDtoModel Map(RecipientUpdateOutputViewModel viewModel)
        {
            var dtoModel = new RecipientUpdateOutputDtoModel
            {
                RecipientId = viewModel.RecipientId
            };

            return(dtoModel);
        }