Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello ,
Is there a documentation on how to use sql query in umbraco ?
Thanks,
K
Hi Kusum
Umbraco uses PetaPOCO as mini ORM, so you can do a query super easy like that:
long count = ApplicationContext.Current.DatabaseContext.Database.ExecuteScalar<long>("SELECT Count(*) FROM articles");
Really nice articles about how to use PetaPOCO with Umbraco - https://www.wiliam.com.au/wiliam-blog/using-petapoco-with-umbraco-is-pretty-sweet
https://anotherdevblog.com/2018/07/15/how-to-use-petapoco-with-umbraco/
Alex
Hello Kusum
Did you solve this issue?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
SQL Query + umbraco
Hello ,
Is there a documentation on how to use sql query in umbraco ?
Thanks,
K
Hi Kusum
Umbraco uses PetaPOCO as mini ORM, so you can do a query super easy like that:
Really nice articles about how to use PetaPOCO with Umbraco - https://www.wiliam.com.au/wiliam-blog/using-petapoco-with-umbraco-is-pretty-sweet
https://anotherdevblog.com/2018/07/15/how-to-use-petapoco-with-umbraco/
Thanks,
Alex
Hello Kusum
Did you solve this issue?
Alex
is working on a reply...