public TipForm Save(TipForm tip)
 {
     if (tip.IsPartner())
     {
         return(Task.Factory.StartNew(() => _adminCommandApplicationService.UpsertPartnerAsync(tip.ToBranch()))
                .Unwrap()
                .GetAwaiter()
                .GetResult().ToTipForm());
     }
     return(Task.Factory.StartNew(() => _adminCommandApplicationService.UpsertBranchAsync(tip.ToBranch()))
            .Unwrap()
            .GetAwaiter()
            .GetResult().ToTipForm());
 }
 public void Delete(TipForm tip)
 {
     if (tip.IsPartner())
     {
         Task.Factory.StartNew(() => _adminCommandApplicationService.DeletePartnerAsync(tip.Id))
         .Unwrap()
         .GetAwaiter()
         .GetResult();
     }
     else
     {
         Task.Factory.StartNew(() => _adminCommandApplicationService.DeleteBranchAsync(tip.Id))
         .Unwrap()
         .GetAwaiter()
         .GetResult();
     }
 }