示例#1
0
        public L_FileUpload addFile(L_FileUpload item)
        {
            L_FileUpload data = new L_FileUpload();

            data.fileName   = item.fileName;
            data.ipAddress  = item.ipAddress;
            data.macAddress = item.macAddress;
            data.type       = item.type;
            data.uploadDate = DateTime.Now;
            data.userId     = item.userId;

            context.L_FileUpload.Add(data);
            context.SaveChanges();

            return(data);
        }
示例#2
0
 public void deleteFile(L_FileUpload item)
 {
     context.L_FileUpload.Remove(item);
     context.SaveChanges();
 }