Beispiel #1
0
        public static bool Guardar(Entidades.Empleados empleado)
        {
            using (var conec = new DAL.ParcialDb())
            {
                try
                {
                    conec.Empleado.Add(empleado);

                    foreach (var g in empleado.Retenciones)
                    {
                        conec.Entry(g).State = System.Data.Entity.EntityState.Unchanged;
                    }

                    conec.SaveChanges();
                    return(true);
                }
                catch (Exception)
                {
                    throw;
                }
            }

            return(false);
        }
 public Repositorio()
 {
     Context = new ParcialDb();
 }
Beispiel #3
0
 public Respository()
 {
     Context = new ParcialDb();
 }