31 lines
999 B
C#
31 lines
999 B
C#
|
|
namespace AyaNova.Api.ControllerHelpers
|
|
{
|
|
|
|
|
|
//return the response with optional readonly flag
|
|
//this exists basically for consistency and to reduce the bandwidth if not readonly which is most common
|
|
//UPDATE: Actually, there's no way for the biz object to set the readonly status and the client doesn't really use it at this point 2020-05-18 09:09:29
|
|
//in theory it should be a non db property of the model if it's going to be used at all so removing it entirely from response as a separate property
|
|
public static class ApiOkResponse
|
|
{
|
|
public static object Response(object result)
|
|
{
|
|
// if (isReadOnly)
|
|
// {
|
|
// return new
|
|
// {
|
|
// Data = result,
|
|
// ReadOnly = true
|
|
// };
|
|
// }
|
|
// else
|
|
// {
|
|
return new { Data = result };
|
|
//}
|
|
|
|
}
|
|
}//eoc
|
|
|
|
|
|
}//eons |