Пример #1
0
        /// <summary>
        /// This method deletes a provider
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public async Task <bool> DeleteProvider(int Id)
        {
            bool result = false;

            if (Id > 0)
            {
                var a = await providerRepository.GetAsync(Id);

                if (a != null)
                {
                    try
                    {
                        providerRepository.DeleteById(a);
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                }
            }
            return(result);
        }