Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        public ActionResult AddInterest(AddInterestRequest request)
        {
            InterestService _interestService = new InterestService();
            BaseResponse    response         = _interestService.AddInterest(request);

            return(Json(response));
        }