public static void Main() { var context = new SoftUniEntities(); var test = context.GetProjectsByEmployee("Ruth", "Ellerbrock"); foreach (var project in test) { Console.WriteLine("{0} - {1} , {2}", project.name, project.Description.Length <= 30 ? project.Description : project.Description.Substring(0, 30) + "...", project.StartDate.ToLocalTime().ToString("g")); } }
static void Main(string[] args) { using (var context = new SoftUniEntities()) { var projects = context.GetProjectsByEmployee("Ruth", "Ellerbrock"); foreach (var project in projects) { Console.WriteLine("{0} - {1}, {2}", project.Name, (project.Description.Length > 29 ? project.Description.Substring(0, 30) + "..." : project.Description), project.StartDate); } } }