Beispiel #1
0
 public Opportunity_OpportunityContactMappingDTO(OpportunityContactMapping OpportunityContactMapping)
 {
     this.ContactId     = OpportunityContactMapping.ContactId;
     this.OpportunityId = OpportunityContactMapping.OpportunityId;
     this.Contact       = OpportunityContactMapping.Contact == null ? null : new Opportunity_ContactDTO(OpportunityContactMapping.Contact);
     this.Errors        = OpportunityContactMapping.Errors;
 }
        public async Task <ActionResult <Opportunity_ContactDTO> > GetContact([FromBody] Opportunity_ContactDTO Opportunity_ContactDTO)
        {
            if (UnAuthorization)
            {
                return(Forbid());
            }
            if (!ModelState.IsValid)
            {
                throw new BindException(ModelState);
            }

            Contact Contact = await ContactService.Get(Opportunity_ContactDTO.Id);

            return(new Opportunity_ContactDTO(Contact));
        }