You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Models
{
public class DyelotsBulkedRecipeProvider : IProvider<DyelotsBulkedRecipe>
{
private BatchDyeingCentralEntities db = new BatchDyeingCentralEntities();
public int Delete(DyelotsBulkedRecipe t)
{
if (t == null) return 0;
var model = db.DyelotsBulkedRecipe.ToList().FirstOrDefault(item => t.Dyelot == item.Dyelot);
if (model == null) return 0;
db.DyelotsBulkedRecipe.Remove(model);
int count = db.SaveChanges();
return count;
}
public int Insert(DyelotsBulkedRecipe t)
{
throw new NotImplementedException();
}
public List<DyelotsBulkedRecipe> Select()
{
return db.DyelotsBulkedRecipe.SqlQuery("select TOP (10000) * from DyelotsBulkedRecipe").ToList();//查询前100条
}
public int Update(DyelotsBulkedRecipe t)
{
throw new NotImplementedException();
}
}
}