public BaseResponse AddInterest(AddInterestRequest request) { try { using (DDS_Context dbContext = new DDS_Context()) { Dictionary_Development_System_Data.Interest temp = new Dictionary_Development_System_Data.Interest(); temp.Name = request.InterestName; temp.CreatedDate = DateTime.Now; temp.UpdatedDate = DateTime.Now; dbContext.Interest.Add(temp); dbContext.SaveChanges(); BaseResponse response = new BaseResponse { IsSucceed = true, Message = "Yeni İlgi Alanı Eklendi" }; return(response); } } catch (Exception ex) { throw ex; } }
public ActionResult AddInterest(AddInterestRequest request) { InterestService _interestService = new InterestService(); BaseResponse response = _interestService.AddInterest(request); return(Json(response)); }