public Respbase CreateFeedback(FeedbackReq req) { UserFacade user = new UserFacade(); bool result = user.CreateFeedback(req); return(user.PromptInfo); }
public ApiResponse AddFeedback([FromBody] FeedbackReq model) { int userId = GetCurrentUserId(); if (string.IsNullOrEmpty(model.Content)) { return(new ApiResponse(Metas.Info_NULL)); } Feedback feedback = new Feedback(); feedback.FeedbackContent = model.Content; feedback.IsReplay = false; feedback.UserId = userId; feedback.CreateTime = DateTime.Now; ncBase.CurrentEntities.Feedback.AddObject(feedback); ncBase.CurrentEntities.SaveChanges(); return(new ApiResponse(Metas.SUCCESS)); }