Esempio n. 1
0
        public UserDevice AddUserDevice(UserDevice userDevice)
        {
            var device = _repairContext.UserDevices.Find(userDevice.Id);

            if (device != null)
            {
                return(device);
            }

            _repairContext.UserDevices.Add(userDevice);
            _repairContext.SaveChanges();
            return(userDevice);
        }
 public RepairDocument AddRepairDocument(RepairDocument document)
 {
     _context.RepairDocuments.Add(document);
     _context.SaveChanges();
     return(document);
 }
 public RepairDevice AddRepairDevice(RepairDevice repairDevice)
 {
     _context.RepairDevices.Add(repairDevice);
     _context.SaveChanges();
     return(repairDevice);
 }