// DELETE: api/Medias/5
        public async Task <int> DeleteAsync(int id)
        {
            int records;

            try
            {
                records = await repository.DeleteAsync(id);
            }

            catch (SqlException ex)
            {
                throw ex;
            }

            catch (Exception ex)
            {
                throw ex;
            }

            return(records);
        }