hi,
after login how to insert Identity name in angular using web api ..
i failed to insert identity name
it is in web api
- public IHttpActionResult addcomment(CommentTable objcomment, string id) {
- int Id = Convert.ToInt32(id);
- string loggedInUserId = User.Identity.GetUserId();
- objcomment.CommentedDate = DateTime.Now;
- objcomment.id = Id;
- objcomment.UserID = loggedInUserId;
- objcomment.CreatedBy = User.Identity.Name;
- ctx.CommentTables.Add(objcomment);
- ctx.SaveChanges();
- return Ok(objcomment);
- }
how to resolve these

Arvind SinghRank #718 · 3.3K reputationPosted Aug 15, 2019, 7:32 PM EDT
sonal malhotraRank #4,317 · 351 reputationPosted Aug 15, 2019, 10:30 PM EDT
Muthu KumarRank #935 · 2.2K reputationPosted Aug 21, 2019, 9:29 PM EDT