Answer the question
In order to leave comments, you need to log in
How to correctly make a fetch in this request on asp.net core 2.0? web api?
I want to make a selection by two fields, is it by the text field and by the record ID?
and I have this code:
var get_like = db.Like.Count(t => t.Text == 'mytext');
var get_like = db.Like.Count(t => t.Text == 'mytext', t.Two == 'd');
[HttpPost("Name/{id}")]
public IActionResult Name(int id)
{
}
Answer the question
In order to leave comments, you need to log in
var get_like = db.Like.Count(t => t.Text == 'mytext' || t.Two == 'd');
var get_like = db.Like.Where(t => t.Text == 'mytext' && t.Two == 'd').Count();
или
var get_like = db.Like.Count(t => t.Text == 'mytext' && t.Two == 'd');
var likeCount = db.Like.Count(t => t.Text == 'mytext' && t.Two == 'd');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question