public IActionResult Delete(int id)
        {
            var model = _freelancer.Delete(id);

            if (model == true)
            {
                return(Ok(_freelancer.Delete(id)));
            }
            else
            {
                return(BadRequest("ocurrio un error al eliminar"));
            }
        }
Exemplo n.º 2
0
        public async Task <bool> DeleteFreelancerAsync(int id)
        {
            using (var uow = UnitOfWorkProvider.Create())
            {
                if ((await freelancerService.GetAsync(id, false)) == null)
                {
                    return(false);
                }
                freelancerService.Delete(id);
                await uow.Commit();

                return(true);
            }
        }