Exemple #1
0
        public async Task <IActionResult> Post([FromBody] CreateEvents command)
        {
            command.EventId = Guid.NewGuid();
            await _service.CreateAsync(command.EventId, command.Name, command.Description, command.StartDate, command.EndDate);

            await _service.AddTicketdsAsync(command.EventId, command.Tickets, command.Price);

            return(Created($"/events/{command.EventId}", null));
        }
Exemple #2
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        //base.OnInspectorGUI();

        CreateEvents myScript = (CreateEvents)target;

        deleteAll = GUILayout.Toggle(deleteAll, "Delete all scriptable objects in location?");
        if (deleteAll)
        {
            areYouSure = GUILayout.Toggle(areYouSure, "Are you sure?");
        }

        if (GUILayout.Button("Create Scriptable Objects"))
        {
            myScript.CreateScriptableObjects(areYouSure);
        }

        /*if(GUILayout.Button("Update Store Objects"))
         * {
         *  myScript.UpdateStore();
         * }*/
    }