Question: a) Add the appropriate data annotation attributes to the below model class to ensure name field is not empty and address between 5 and

a) Add the appropriate data annotation attributes to the below model class to ensure name field is not empty

a) Add the appropriate data annotation attributes to the below model class to ensure name field is not empty and address between 5 and 25 characters. (3 marks) public class User } b) Mention the numbers of four syntax errors in the code below. Re-write code in correct way. (4 marks) public static void Main(string[] args) { 9 10 - 11 12 13 - 14- 15 16- 17 18- 19 20 21 public string name {get; set; } public string address {get; set;} 222 23 } } Console.WriteLine "Hello Guys!"); int[] marks (100,87,12,45.23); foreach(int m at marks) { if(m>=85){ Console.WriteLine("You got HD"); }else if (m>=50) { }else{ Console.WriteLine("You Console.WriteLine("You just Pass") failed");

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

From the provided image we need to do the following a Add data annotation attributes to ensure that ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!