public ResponseModel InsertAcivity([FromBody] ActivityPostModel activityPostModel) { var objResponse = new ResponseModel(); try { if (!string.IsNullOrEmpty(activityPostModel.ImageStr)) { var arrData = activityPostModel.ImageStr.Split(','); if (arrData.Length > 0) { activityPostModel.ImageStr = arrData[1]; } activityPostModel.ImageURL = Utilities.SaveImage(activityPostModel.ImageStr, activityPostModel.ImageType, FileSavePath.ACTIVITYIMGPATH.ToString()); } objResponse.IsSuccess = _activityService.InsertActivity(activityPostModel); } catch (Exception ex) { objResponse.IsSuccess = false; objResponse.Message = ex.Message.ToString(); } return(objResponse); }
public bool InsertActivity(ActivityPostModel activityPostModel) { return(_ActivityRepo.InsertActivity(activityPostModel)); }