I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component public class AllViewComponent : ViewComponent { private readonly UserManager<ApplicationUser> _userManager; public AllViewComponent(UserManager<ApplicationUser> userManager) { _userManager = userManager; } public async Task<IViewComponentResult> InvokeAsync() { List<StudentViewModel> allUsers = new List<StudentViewModel>(); var items = await _userManager.Users.ToListAsync(); foreach (var item in items) { allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email }); }
There are various types of operators, we use in expression. Where we use multiple arithmetic operator known as expression. Your arithmetic expression is
d=a+b*c;
In this expression, we used three operator, such as assignment operator, arithmetic positive, and arithmetic multiplication operator. Also we used four operands, such as a,b,c and d operands. So we use variety of operator for designing expression for user query. Some of operator we use, like
Mathematical operators are
+, - : Unary positive, negative
+ : Addition
- : Subtraction
* : Multiplication
/ : Division
% : reminder
If you use more than one operator in any expression, evaluate expression according to operator precedence also evaluate expression left to right according to precedence rule.
Now, just take an simple precedence of mathematical operator are:
Unary + and - (I)
* and / (II)
+ and - (III)
In above mentioned expression ( d=a+b*c ), first calculate multiplication between operand b and c, after that result of the multiplication will be added with operand a. If you want to override the default precedence, use parentheses around the portion of the expression that is to be evaluated first. In some other expression, where we use string datatype then we use + operator for string concatenation. So we can say that '+' operator is used in addition as well as string concatenation.
d=a+b*c;
In this expression, we used three operator, such as assignment operator, arithmetic positive, and arithmetic multiplication operator. Also we used four operands, such as a,b,c and d operands. So we use variety of operator for designing expression for user query. Some of operator we use, like
Mathematical operators are
+, - : Unary positive, negative
+ : Addition
- : Subtraction
* : Multiplication
/ : Division
% : reminder
If you use more than one operator in any expression, evaluate expression according to operator precedence also evaluate expression left to right according to precedence rule.
Now, just take an simple precedence of mathematical operator are:
Unary + and - (I)
* and / (II)
+ and - (III)
In above mentioned expression ( d=a+b*c ), first calculate multiplication between operand b and c, after that result of the multiplication will be added with operand a. If you want to override the default precedence, use parentheses around the portion of the expression that is to be evaluated first. In some other expression, where we use string datatype then we use + operator for string concatenation. So we can say that '+' operator is used in addition as well as string concatenation.
Comments
Post a Comment