I have the following model :
public class Crm_Analise
{
[Key]
public int id { get; set; }
public string cod_item_CRM { get; set; }
public string TAG { get; set; }
public string data_creat { get; set; }
public str...
I'm having trouble in ordering a query where I have to sort the children by the ID, Follow Source.
public Grid GetByOrderGridData(long id)
{
var query = from c in context.Set<Grid>()
where c.Id == id
o...
I have an object of type Ata where I have the property NroAta that corresponds to the number of the Minutes in question, but in the grid when I will sort by this number, it ends up putting the numbers in the wrong order. Ex.:...
I want to remove spaces from the beginning and end of the string ( Trim ) in all positions of the array , but none of the forms below worked.
What am I doing wrong?
var optionArray = new string[] { "in the jungle ", " the mighty jungle"...
I'm using EF6 and would like to know how to get the best performance by redeeming a single property from a Entity .
Assuming the following case:
Let's say I need to fetch all names from a 5000-line user table.
User.c...
I have two classes, Cliente and Endereco , where the client has 1 or more addresses, so it is a list of objects:
class Cliente {
public string Nome { get; set; }
public string Cpf { get; set; }
public List<Endereco&...
I have a query in LINQ where I use SumAsync , however when my entity is empty I have the exception:
The cast to value type 'System.Decimal' failed because the
materialized value is null. Either the result type's generic para...
When you run the query below:
public ActionResult GridViewPartial()
{
if (Session["cod_cli"] != null)
{
int cod_cli = Convert.ToInt32(Session["cod_cli"]);
//var model = db.DadosTecnicos;...
I'm developing a program in C #. In it I have three tables:
produto
{
string idProduto;
string descricao;
}
entrada
{
string idProduto;
int quant;
}
saida
{
string idProduto;
int quant;
}
I want to create a class l...
I wanted to make an inner join so that I get a list with the names of Logins from the Integer List of UsuarioID of class LoginsAtivos .
public class Login
{
public int ID { get; set; }
[Required]
public string N...