This commit is contained in:
CortexCore
2023-07-20 14:38:35 +08:00
parent a9666899a7
commit 39204672cd
4 changed files with 22 additions and 13 deletions

View File

@@ -271,9 +271,9 @@ public class IDIS_DBContext:DbContext
SaveChangesAsync();
}
public bool Update(string handle, string format, string value)
public bool Update(string handle, string name, string value)
{
var result = Datas.FirstOrDefault(x => x.Handle == handle && x.Format == format);
var result = Datas.FirstOrDefault(x => x.Handle == handle && x.Name == name);
if (result is null) return false;
result.UpdateTime=DateTime.Now;
result.Value = value;
@@ -313,5 +313,5 @@ public partial class IDIS_Service:Node
public void RegisterReference(string handle,string refenceHandle) => Context.RegisterReference(handle,refenceHandle);
public static string GenerateHandle() => $"88.123.99/{Mathf.Abs(Guid.NewGuid().GetHashCode())}";
public bool Query(string key, out IDIS_Query query) => Context.Query(key, out query);
public bool Update(string handle, string format, string value) => Context.Update(handle, format, value);
public bool Update(string handle, string name, string value) => Context.Update(handle, name, value);
}