public static string InsertResource(Resource resource) { resource.Key = CreateUniqueId(); Resources.Add(resource); return(resource.Key); }
public static void UpdateResource(Resource resource) { Resource item = Resources.FirstOrDefault(c => c.Key.Equals(resource.Key)); item.Name = resource.Name; }