public async Task <ActionResult <GenericViewResource> > PostAction([FromServices] IPost post, [FromBody] GenericViewResource gen) { log.LogInformation($"Adding {gen.Name} to the database"); return(await TryTask <GenericViewResource> .Run(async() => { await post.AddGeneric(gen); return Ok(gen); })); }