using System.Linq; using Composite.Data; namespace Demo { public class Class2 { public static void UpdateData(string userOldName, string userNewName) { using (DataConnection connection = new DataConnection()) { Demo.User myUser = (from d in connection.Get() where d.Name == userOldName select d).First(); myUser.Name = userNewName; connection.Update(myUser); } } } }