Hello,
I’m using API Explorer for testing.
Are there some DTO object names to avoid in order to keep the API explorer functionality?
In the specific, I have a request that contains a DTO called “Function”, if I remove the request from the service API Explorer works otherwise I receive an http exception and the browser page is blank.
If possible I would like to avoid renaming the “Function” class.
Thank you.
Part of the DTO:
[Schema("rcs")]
[Alias("Functions")]
public class Function
{
[PrimaryKey]
[AutoIncrement]
public int Id { get; set; }
[Required]
[StringLength(50)]
[Index(Unique=true)]
public string Code { get; set; }
[Required]
[ForeignKey(typeof(FunctionFamily))]
public int FamilyId { get; set; }
...
}
The request:
public class RcsFunctionAdd : IReturn<int>
{
public Function Entity { get; set; }
}
Service implementation:
[Authenticate]
[RequiresAnyPermission(FullPermission, AddPermission)]
public RequestResult<int> Post(RcsFunctionAdd request)
{
Manager mng = new Manager(this.Parameters);
int id = mng.Insert<Function>(request.Entity);
return new RequestResult<int>() { Value = id };
}