Last active
March 22, 2018 18:27
-
-
Save cyrilCodePro/d348a914427a5291cf06af681b3bb508 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Student | |
{ | |
public Guid Id { get; set; } | |
public string Name { get; set; } | |
public int Marks { get; set; } | |
} | |
/////// | |
public class StudentCrud | |
{ | |
public static List<Student> GetStudents() | |
{ | |
List<Student> test = new List<Student>(); | |
var student = new Student | |
{ | |
Id = Guid.NewGuid(), | |
Name = "Cyril", | |
Marks = 100 | |
}; | |
test.Add(student); | |
return test; | |
} | |
public static void AddTolist(string name,int marks) | |
{ | |
var student = new Student | |
{ | |
Id=Guid.NewGuid(), | |
Name=name, | |
Marks=marks, | |
}; | |
GetStudents().Add(student); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment