File tree 4 files changed +37
-6
lines changed
Tigernet.Samples.RestApi/Resters
4 files changed +37
-6
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,13 @@ public async ValueTask<object> GetByFilter(EntityQueryOptions<User> model)
23
23
return Ok ( await userClever . GetAsync ( model ) ) ;
24
24
}
25
25
26
+ [ Deleter ( "/user-remove" ) ]
27
+ public async ValueTask < object > Remove ( )
28
+ {
29
+ var res = userClever . Delete ( 2 ) ;
30
+ return Ok ( res ) ;
31
+ }
32
+
26
33
[ Getter ]
27
34
public async ValueTask < object > Get ( )
28
35
{
Original file line number Diff line number Diff line change
1
+ using Tigernet . Hosting . Attributes . HttpMethods . Commons ;
2
+ using Tigernet . Hosting . Exceptions ;
3
+ using ArgumentNullException = Tigernet . Hosting . Exceptions . ArgumentNullException ;
4
+
5
+ namespace Tigernet . Hosting . Attributes . HttpMethods
6
+ {
7
+ /// <summary>
8
+ /// The 'DeleterAttribute' class used to represent a DELETE HTTP method.
9
+ /// </summary>
10
+ public class DeleterAttribute : HttpMethodAttribute
11
+ {
12
+ public DeleterAttribute ( string route = null )
13
+ : base ( route )
14
+ {
15
+
16
+ }
17
+
18
+ internal override string HttpMethodName
19
+ {
20
+ get => "DELETE" ;
21
+ }
22
+ }
23
+ }
Original file line number Diff line number Diff line change 6
6
public class PosterAttribute : HttpMethodAttribute
7
7
{
8
8
/// <inheritdoc />
9
- public PosterAttribute ( string route = null )
9
+ public PosterAttribute ( string route = null )
10
10
: base ( route )
11
11
{
12
-
13
12
}
14
13
15
14
/// <inheritdoc/>
16
- internal override string HttpMethodName { get => "POST" ; }
17
-
18
- }
15
+ internal override string HttpMethodName
16
+ {
17
+ get => "POST" ;
18
+ }
19
+ }
Original file line number Diff line number Diff line change @@ -6,5 +6,5 @@ public ArgumentNullException(string argumentName)
6
6
: base ( $ "The argument '{ argumentName } ' cannot be null, please provide a valid input!")
7
7
{
8
8
}
9
-
9
+
10
10
}
You can’t perform that action at this time.
0 commit comments