Ejemplo n.º 1
0
        public async Task <ActionResult> Delete(int id)
        {
            var exist = await context.Actors.FirstOrDefaultAsync(x => x.id == id);

            if (exist == null)
            {
                return(NotFound());
            }
            context.Remove(exist);
            await context.SaveChangesAsync();

            await storageFile.DeleteFiles(exist.Photo, container);

            return(NoContent());
        }