public serveeventfeedback NewFeedback(serveeventfeedback feedback) { try { var entity = _feedbackRepo.Create(feedback); _fsllDB.SaveChanges(); return entity; } catch { throw; } }
public static serveeventfeedback ToServeEventFeedback(this FeedbackBasicModel model, int eventID) { if (model == null) return null; var entity = new serveeventfeedback() { Feedback = model.Feedback, FromMemberID = model.FromMemberID, FromMemberName = model.From, ID = model.FeedbackID, TargetMemberID = model.TargetMemberID, TargetMemberName = model.Target, }; entity.ServeEventID = eventID; return entity; }
public static serveeventfeedback ToServeEventFeedback(this NewServeEventModel._FeedbackModel model, int eventID, MemberModel target) { if (model == null) return null; var entity = new serveeventfeedback() { Feedback = model.Feedback, FromMemberID = model.FromMemberID, FromMemberName = model.From, ID = model.FeedbackID, TargetMemberID = target.MemberID, TargetMemberName = target.MemberName }; entity.ServeEventID = eventID; return entity; }