private static void AddMachDir(MachineContents m, DirectoryContents d) { MachineDir md1 = MachineDir.CreateMachineDir(m.Id, d.Id, d.LocalPath); using (filesyncEntitiesNew context = new filesyncEntitiesNew()) { context.MachineDirs.AddObject(md1); context.SaveChanges(); } }
private static void AddMachDir(MachineModel m, DirModel d) { MachineDir md1 = MachineDir.CreateMachineDir(m.Id, d.Id, d.Path); using (filesyncEntities context = new filesyncEntities()) { context.MachineDirs.AddObject(md1); context.SaveChanges(); } }
public static void Add(MachdirModel md) { MachineDir md1 = MachineDir.CreateMachineDir(1, md.Dir, md.Path); using (filesyncEntities context = new filesyncEntities()) { context.MachineDirs.AddObject(md1); context.SaveChanges(); } }