示例#1
0
        public async Task <InteractionResponseModel> CreateInteraction(InteractionRequestModel interactionRequestModel)
        {
            var interaction = new Interactions
            {
                ClientId = interactionRequestModel.ClientId,
                EmpId    = interactionRequestModel.EmpId,
                IntType  = interactionRequestModel.type,
                IntDate  = interactionRequestModel.Date,
                Remarks  = interactionRequestModel.Remarks,
            };
            var createdInteraction = await _interactionsRepository.AddAsync(interaction);

            var response = new InteractionResponseModel
            {
                Id       = createdInteraction.Id,
                ClientId = createdInteraction.ClientId,
                EmpId    = createdInteraction.EmpId,
                type     = createdInteraction.IntType,
                Date     = createdInteraction.IntDate,
                Remarks  = createdInteraction.Remarks,
            };

            return(response);
        }
        public async Task <Interactions> CreateInteractions(Interactions interactions)
        {
            var ints = await _interactionsRepository.AddAsync(interactions);

            return(ints);
        }