public GenericResult <bool> AddNotPlayebleSong(OnlineRadioNotPlayebleSongModel inputParams)
        {
            var result = new GenericResult <bool>();

            try
            {
                using (var db = new RssAggregatorModelContainer(true))
                {
                    db.AddEntity(new SongsBlackList
                    {
                        SongURL = inputParams.SongURL,
                        City    = inputParams.City,
                        Country = inputParams.Country
                    });

                    result.SetDataResult(true);
                }
            }
            catch (Exception ex)
            {
                Logger.LogException(ex, LogTypeEnum.BAL);
                result.SetErrorResultCode(SettingService.GetUserFriendlyExceptionMessage());
            }

            return(result);
        }
Beispiel #2
0
 public JsonResult AddNotPlayebleSong([FromBody] OnlineRadioNotPlayebleSongModel inputParams)
 {
     return(new JsonResult
     {
         Data = OnlineRadioService.AddNotPlayebleSong(inputParams),
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     });
 }