public async Task <string> NoteCreate([FromBody] string value) { string newNoteID = "0"; try { dynamic productNote = JsonConvert.DeserializeObject <Object>(value); int ref_id = productNote.ref_id; string note = productNote.note; int created_by = productNote.created_by; double created_at = _common.GetTimeStemp(); newNoteID = await _NotesAndDoc.GenericPostNote <string>(ref_id, note_type, note, created_by, created_at); int userId = productNote.created_by; event_product_note_create = event_product_note_create.Replace("%%userid%%", userId.ToString()); event_product_note_create = event_product_note_create.Replace("%%pid%%", ref_id.ToString()); await _eventRepo.AddPhotoshootAsync(ref_id, event_product_note_create_id, ref_id, event_product_note_create, userId, _common.GetTimeStemp(), table_name); await _eventRepo.AddEventAsync(event_product_note_create_id, userId, ref_id, event_product_note_create, _common.GetTimeStemp(), user_event_table_name); } catch (Exception ex) { var logger = _loggerFactory.CreateLogger("internal_error_log"); logger.LogInformation("Problem happened in making new Photoshoot Note with message" + ex.Message); } return(newNoteID); }