mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-03-13 03:20:24 +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 @@ namespace Project_Unite.Controllers
|
|||
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…
Add table
Reference in a new issue