Home > Net >  WebAPI MSSQL new records
WebAPI MSSQL new records

Time:12-15

Just learning ASP, a lot of basic don't understand, I the idea is to pass the field values of parameters, a new SQL records, but red which sentence is wrong, I don't know how to create a record as an example, consult

Public IEnumerable GetAdd (String strBMNo, String strBMName, String strMemo)
{
Using (LinLongHrmEntities entities=new LinLongHrmEntities ())
{

IEnumerable RowBMZL=new IEnumerable (strBMNo strBMName, strMemo);
Entities. BMZL. AddRange (rowBMZL);
Var intAdd=entities. SaveChanges ();
If (intAdd==1)
{
Yield return "new complete department data";
}
The else
{
Yield return "department information new failure";
}

}

}
  • Related