Example #1
0
 /// <summary>
 /// Adds a route for the resource type <typeparamref name="T"/> and marks the custom <paramref name="verb" /> as allowed.
 /// The route will also have an <paramref name="id"/> parameter to identify the resource being deleted.
 /// </summary>
 /// <typeparam name="T">A model class that implements <see cref="IApiModel"/></typeparam>
 /// <typeparam name="TKey">The type of the key that identifies the model</typeparam>
 /// <param name="request"></param>
 /// <param name="verb">A custom HTTP verb.</param>
 /// <returns></returns>
 public static Route <T, TKey> OnCustomHttpVerb <T, TKey>(this FluentWebApiRequest request, string verb, TKey id = null)
     where T : class, IApiModel
     where TKey : class
 {
     return(OnVerb <T, TKey>(HttpVerb.GetVerb(verb), id));
 }
Example #2
0
 /// <summary>
 /// Adds a route for the resource type <typeparamref name="T"/> and marks the custom <paramref name="verb" /> as allowed.
 /// </summary>
 /// <typeparam name="T">A model class that implements <see cref="IApiModel"/></typeparam>
 /// <param name="request"></param>
 /// <param name="verb">A custom HTTP verb.</param>
 /// <returns></returns>
 public static Route <T> OnCustomHttpVerb <T>(this FluentWebApiRequest request, string verb) where T : class, IApiModel
 {
     return(OnVerb <T>(HttpVerb.GetVerb(verb)));
 }