/// <summary> /// Deletes the given model. /// </summary> /// <param name="model">The model</param> public static void Delete(this AliasService service, Alias model) { service.DeleteAsync(model).GetAwaiter().GetResult(); }
/// <summary> /// Deletes the model with the specified id. /// </summary> /// <param name="id">The unique id</param> public static void Delete(this AliasService service, Guid id) { service.DeleteAsync(id).GetAwaiter().GetResult(); }
/// <summary> /// Gets the model with the given redirect url. /// </summary> /// <param name="url">The unique url</param> /// <param name="siteId">The optional site id</param> /// <returns>The model</returns> public static IEnumerable <Alias> GetByRedirectUrl(this AliasService service, string url, Guid?siteId = null) { return(service.GetByRedirectUrlAsync(url, siteId).GetAwaiter().GetResult()); }
/// <summary> /// Gets the model with the given alias url. /// </summary> /// <param name="url">The unique url</param> /// <param name="siteId">The optional site id</param> /// <returns>The model</returns> public static Alias GetByAliasUrl(this AliasService service, string url, Guid?siteId = null) { return(service.GetByAliasUrlAsync(url, siteId).GetAwaiter().GetResult()); }
/// <summary> /// Gets the model with the specified id. /// </summary> /// <param name="id">The unique id</param> /// <returns>The model, or null if it doesn't exist</returns> public static Alias GetById(this AliasService service, Guid id) { return(service.GetByIdAsync(id).GetAwaiter().GetResult()); }
/// <summary> /// Gets all available models for the specified site. /// </summary> /// <param name="siteId">The optional site id</param> /// <returns>The available models</returns> public static IEnumerable <Alias> GetAll(this AliasService service, Guid?siteId = null) { return(service.GetAllAsync().GetAwaiter().GetResult()); }