public IActionResult Post([FromBody] AccountConsultant account)
 {
     this.service.Add(account);
     if (account.Id == Guid.Empty)
     {
         return(StatusCode(500));
     }
     return(Ok(account));
 }
        public IActionResult Post(AccountConsultant cons)
        {
            var newcons = accConService.Create(cons);

            if (newcons.Id == Guid.Empty)
            {
                return(StatusCode(500));
            }
            return(Ok(newcons));
        }
Example #3
0
        public IActionResult Post(AccountConsultant accountConsultant)
        {
            var newAccountConsultant = accountConsultantService.Create(accountConsultant);

            if (newAccountConsultant.Id == Guid.Empty)
            {
                return(StatusCode(500));
            }
            return(CreatedAtAction("Get", newAccountConsultant));
        }
Example #4
0
 internal static AccountConsultantDto MapAccountConsultant(AccountConsultant accountConsultant)
 {
     return(new AccountConsultantDto
     {
         BuyPrice = accountConsultant.BuyPrice,
         EndDate = accountConsultant.EndDate,
         SellPrice = accountConsultant.SellPrice,
         StartDate = accountConsultant.StartDate,
         Account = MapAccount(accountConsultant.Account),
         Consultant = MapConsultant(accountConsultant.Consultant),
         Employee = MapEmployee(accountConsultant.Employee)
     });
 }
Example #5
0
 public AccountConsultant Create(AccountConsultant accountConsultant)
 {
     return(accountConsultantRepository.Create(accountConsultant));
 }
 public void Update(AccountConsultant account)
 {
     repo.Update(account);
 }
 public void Delete(AccountConsultant account)
 {
 }
 public AccountConsultant Create(AccountConsultant account)
 {
     return(repo.Add(account));
 }
 public IActionResult Update(AccountConsultant cons)
 {
     accConService.Update(cons);
     return(Ok(cons));
 }
 public IActionResult Delete(AccountConsultant a)
 {
     service.Delete(a);
     return(NoContent());
 }
 public void Delete(AccountConsultant a)
 {
     repo.Delete(a);
 }
 public AccountConsultant Add(AccountConsultant a)
 {
     return(repo.Add(a));
 }
Example #13
0
 public IActionResult Delete(AccountConsultant accountConsultant)
 {
     accountConsultantService.Delete(accountConsultant);
     return(NoContent());
 }
 public IActionResult Put(AccountConsultant a)
 {
     service.Update(a);
     return(Ok(a));
 }
Example #15
0
 public void Delete(AccountConsultant accountConsultant)
 {
     accountConsultantRepository.Delete(accountConsultant);
 }
Example #16
0
 public void Update(AccountConsultant accountConsultant)
 {
     accountConsultantRepository.Update(accountConsultant);
 }
 public IActionResult Delete(AccountConsultant cons)
 {
     accConService.Delete(cons);
     return(NoContent());
 }