beego / samples

An open source project for beego sample applications.
Apache License 2.0
917 stars 1.25k forks source link

Sample with a database #34

Open dre2004 opened 5 years ago

dre2004 commented 5 years ago

Hello,

I am new to Beego and I'm really enjoying the framework, I was wondering if it was possible to include a sample that had a database back-end.

There are probably lots of ways to structure this but if a sample included one possible way (the idiomatic way) it would really be helpful for new people.

For example, it would answer some of the following questions (of which I'm unsure about myself).

  1. How do I connect my application to a database
  2. Where should my CRUD logic go (in the model or in the controller?)