public int Reply(ViewModels.ReplyRequest model, int userId) { var reaction = new Models.Reaction { Comment = model.Comment, AuthorId = userId, GameMapVariantId = model.Id, ParentReactionId = model.ParentId, IsDeleted = false, PostedOn = DateTime.UtcNow }; db.Reactions.Add(reaction); db.SaveChanges(); return(reaction.Id); }
public int Reply(ViewModels.ReplyRequest model, int userId) { var reaction = new Models.Reaction { Comment = model.Comment, AuthorId = userId, GameMapVariantId = model.Id, ParentReactionId = model.ParentId, IsDeleted = false, PostedOn = DateTime.UtcNow }; db.Reactions.Add(reaction); db.SaveChanges(); return reaction.Id; }