简体   繁体   中英

How do I insert an entity with 2sxc in a razor script?

Instead of reading data out of 2sxc, I want to pump a list of data into a 2sxc stream. As all should run on the server-side within a razor script, I don't want to use WebApi and post every single entity.

It is possible to do CRUD operations within a razor script? Any example/demo available?

我找到了您可能感兴趣的页面(2sxc 的官方 GitHub): https : //github.com/2sic/2sxc/wiki/razor-dnn

Finally I found it in the documentation:

  1. App.Data.Create(contentTypeName, values, userName)
  2. App.Data.Update(entityId, values, userName)
  3. App.Data.Delete(entityId, userName)

https://2sxc.org/en/docs/Feature/feature/3360
https://github.com/2sic/2sxc/wiki/razor-app

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM