Exemple #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);
        }
Exemple #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);
        }