//PARA GUARDAR
 public async Task<Detalle> Save(Detalle value)
 {
     if (value.IdDetalles == 0)
     {
         await context.Detalle.AddAsync(value);
     }
     else
     {
         context.Detalle.Update(value);
     }
     await context.SaveChangesAsync();
     return value;
 }
        //PARA GUARDAR
        public async Task <Detalle> Save(Detalle dta)
        {
            var remoteService = RestService.For <IRemoteService>("https://localhost:44364/api/");

            return(await remoteService.SetDetalle(dta));
        }