0

I have just started learning Umbraco. I am a backend-developer (PHP) for many years now.

I am learning Umbraco and working in version 7.1.6. I work in .Net using C# syntax.

So far i feel confident about document-types, templates macro etc.

Hover i am working on a solution where i would like to add some values, to a custom table in the database.

I have no idea how to create tables, or if I even should (perhaps there is another way/method in .NET)?

In specifik, i want a database to store these values:

 id (int - is it possible to auto increment this value?)
 tokenID (string)
 Name (string)
 amount(int)

Also i need an operation/function to set and get these values from the table.

Any help to pointing me in the right direction is much appreciated.

Perhaps you can help me if you know a good tutorial to follow.

Thx.

Hans Preutz
  • 679
  • 2
  • 10
  • 28

1 Answers1

0

I suggest you take a look at this: Umbraco, is it just me or is it really hard to use?. There's a mental leap you need to make when you first start using Umbraco.

Usually if you want to store data in the database you really want to either create a set of Umbraco nodes to represent logical objects or create a new DataType (if it's just storing arbitrary values).

Umbraco nodes don't have to be web pages - they can represent objects and be used to build the pages for other nodes.

HTH.

Community
  • 1
  • 1
Ian Grainger
  • 5,148
  • 3
  • 46
  • 72