mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
add discrimination number to blog id
This commit is contained in:
parent
f6f3c628e0
commit
e4ba458f24
1 changed files with 1 additions and 0 deletions
|
@ -160,6 +160,7 @@ public ActionResult PostBlog(PostBlogViewModel model)
|
|||
if (!allowed.Contains(c))
|
||||
blog.Id = blog.Id.Replace(c, '_');
|
||||
}
|
||||
blog.Id += "_" + db.BlogPosts.Count().ToString();
|
||||
blog.PostedAt = DateTime.Now;
|
||||
db.BlogPosts.Add(blog);
|
||||
db.SaveChanges();
|
||||
|
|
Loading…
Reference in a new issue