コード例 #1
0
 //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;
 }
コード例 #2
0
        //PARA GUARDAR
        public async Task <Detalle> Save(Detalle dta)
        {
            var remoteService = RestService.For <IRemoteService>("https://localhost:44364/api/");

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