public int Upload(byte[] array) { var file = new tblfile { created = DateTime.Now, data = array }; _context.tblfiles.AddObject(file); _context.SaveChanges(); return file.idfile; }
/// <summary> /// Deprecated Method for adding a new object to the tblfiles EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTotblfiles(tblfile tblfile) { base.AddObject("tblfiles", tblfile); }
/// <summary> /// Create a new tblfile object. /// </summary> /// <param name="idfile">Initial value of the idfile property.</param> /// <param name="created">Initial value of the created property.</param> /// <param name="data">Initial value of the data property.</param> public static tblfile Createtblfile(global::System.Int32 idfile, global::System.DateTime created, global::System.Byte[] data) { tblfile tblfile = new tblfile(); tblfile.idfile = idfile; tblfile.created = created; tblfile.data = data; return tblfile; }