コード例 #1
0
    public Task <ActionResult> Create([FromBody] AspNetCoreWebApi.Entity.Request obj)
    {
        Console.WriteLine("Dedicated implement of route {0}", this.RouteData.ToString());
        // TODO : validar se entity.getState() é um State com antecessor vazio.
        if (obj.Date == null)
        {
            obj.Date = System.DateTime.Now;
        }

        String serviceName = CaseConvert.UnderscoreToCamel(obj.GetType().Name, false);

        return(RequestFilter.ProcessCreate <AspNetCoreWebApi.Entity.Request>(this.User.Identity, this.entityManager, serviceName, obj));
    }
    public Task <ActionResult> Create([FromBody] RequestProduct obj)
    {
        String serviceName = CaseConvert.UnderscoreToCamel(obj.GetType().Name, false);

        return(RequestFilter.ProcessCreate <RequestProduct>(this.User.Identity, this.entityManager, serviceName, obj));
    }