static void Main() { var context = new SoftUniEntities(); var projects = context.usp_FindProjectsForEmployee("Ruth", "Ellerbrock").ToList(); foreach (var project in projects) { Console.WriteLine("{0} - {1} {2}", project.Name, Regex.Replace(project.Description, "(?<=^.{30}).*", "..."), project.StartDate); } }
static void Main() { System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; var context = new SoftUniEntities(); var projects = context.GetProjectsByemployee("Ruth", "Ellerbrock"); foreach (var project in projects) { Console.WriteLine("{0} - {1}, {2:dd/MM/yyyy hh:mm:ss}", project.Name, project.Description, project.StartDate); } }
public static List <usp_GetProjectsByEmployee_Result> GetProjectsByemployee(this SoftUniEntities context, string firstName, string lastName) { var projects = context.usp_GetProjectsByEmployee(firstName, lastName).ToList(); return(projects); }