public IHttpActionResult AddData(template templateobj) { AuthDetails authdet = LoginUserDetails(); templateobj.userid = authdet.UserId; templateobj.CreatedBy = authdet.UserId; templateobj.UpdatedBy = authdet.UserId; var result = service.Add(templateobj); return(Ok(result)); }