public async Task <string> AddQuery(QueryReplyModel query) { DateTime now = DateTime.Now; if (query.RefDocument.Contains("NaN,")) { query.RefDocument = query.RefDocument.Replace("NaN,", ""); } int insertedqueryid = await QueryRepository.AddQuery(new Query { ProjectID = query.ProjectID, Subject = query.QueryText, AssignTo = query.AssignTo, AssignToMailID = query.AssignToMailID, Querytype = query.Querytype, Severity = query.Severity, Status = query.Status, RefDocument = query.RefDocument, CreatedDate = query.CreatedDate, CreatedBy = query.CreatedBy }); int insertedrelyid = await ReplyRepository.AddReply(new Reply { QueryId = insertedqueryid, QueryText = query.QueryText, ReplyText = query.Replytext, QueryDate = now, ReplyDate = now, CreatedDate = query.CreatedDate, CreatedBy = query.CreatedBy }); return(insertedqueryid != 0 ? "Successfully Insertion of query record" : "Insertion failed"); }
public void AddQuery(DomainQuery query) { _queryRepository.AddQuery(query?.ToInfrastructure()); }