add add
This commit is contained in:
parent
81042a87fc
commit
9c61ffba70
@ -5,11 +5,13 @@ using LootBoxSimulator.Models.DAO;
|
|||||||
RemoteDatabaseContext db = new RemoteDatabaseContext();
|
RemoteDatabaseContext db = new RemoteDatabaseContext();
|
||||||
|
|
||||||
|
|
||||||
|
//add value
|
||||||
CategoryDao newCategory = new CategoryDao
|
CategoryDao newCategory = new CategoryDao
|
||||||
{
|
{
|
||||||
Name = "epic"
|
Name = "epic"
|
||||||
};
|
};
|
||||||
|
db.Categories.Add(newCategory);
|
||||||
|
db.SaveChanges();
|
||||||
//change value
|
//change value
|
||||||
var categoriesUpd = db.Categories.Find(3);
|
var categoriesUpd = db.Categories.Find(3);
|
||||||
if(categoriesUpd == null) return;
|
if(categoriesUpd == null) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user