Add post, fix delete forum, fix null pointer exceptions, min max limist
on database strings
This commit is contained in:
@@ -21,6 +21,7 @@ namespace DAL.Helpers
|
||||
|
||||
};
|
||||
ctx.Foorums.Add(foorum);
|
||||
ctx.SaveChanges();
|
||||
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
@@ -30,7 +31,8 @@ namespace DAL.Helpers
|
||||
Title = $"Post {i}",
|
||||
Author = "Karu",
|
||||
Body = $"Pikk sisu {i}",
|
||||
CreationTime = DateTime.Now
|
||||
CreationTime = DateTime.Now,
|
||||
ForumId = foorum.FoorumId
|
||||
};
|
||||
ctx.Posts.Add(post);
|
||||
foorum.Posts.Add(post);
|
||||
|
||||
Reference in New Issue
Block a user