|
use entity framework
|
# ¿ Sep 27, 2013 20:49 |
|
|
# ¿ Apr 25, 2024 13:15 |
|
yeah i stay away from relationship modeling in code-first EF, its always turned into a massive pain in the rear end with not enough control for me. what i do instead is just model my entities as standalone objects in the db, and use a repository pattern and sql queries to do what i want. so if you needed to add a Fart to a Butt, the API looks like ButtRepository.AddFart(Fart fart); which just does the needful with the database. if you really want to do the code first thing tho, you can do this: code:
Plastic Snake fucked around with this message at 17:48 on Sep 28, 2013 |
# ¿ Sep 28, 2013 17:40 |
|
it is dumb, that's why I said not to do it that way. much better to use it as a statement mapper.
|
# ¿ Sep 28, 2013 19:29 |
|
working on a little random terrain/map generator. implementing perlin noise is making my head hurt
|
# ¿ Dec 27, 2013 21:22 |