Exemplo n.º 1
0
        /// <summary>
        /// <see cref="MyCompany.Visitors.Client.IVisitService"/>
        /// </summary>
        /// <param name="visit"><see cref="MyCompany.Visitors.Client.IVisitService"/></param>
        /// <returns><see cref="MyCompany.Visitors.Client.IVisitService"/></returns>
        public async Task Update(Visit visit)
        {
            string url = String.Format(CultureInfo.InvariantCulture
              , "{0}api/visits", _urlPrefix);

            await base.PutAsync<Visit>(url, visit);
        }
Exemplo n.º 2
0
        /// <summary>
        /// <see cref="MyCompany.Visitors.Client.IVisitService"/>
        /// </summary>
        /// <param name="visit"><see cref="MyCompany.Visitors.Client.IVisitService"/></param>
        /// <returns><see cref="MyCompany.Visitors.Client.IVisitService"/></returns>
        public async Task<int> Add(Visit visit)
        {
            string url = String.Format(CultureInfo.InvariantCulture
              , "{0}api/visits", _urlPrefix);

            return await base.PostAsync<int, Visit>(url, visit);
        }