public test2 TestAddTest2(test2 test22, int testId) { var test = EfContent.Where <Test1>(p => p.Id == testId).FirstOrDefault(); var tset23 = test.AddTest2(test22); EfContent.Add(tset23); EfContent.SaveChanges(); return(tset23); }
/// <summary> /// 获取一条数据 /// </summary> /// <returns></returns> public Dto.TestDtos.TestDto GetTest() { return(EntityToDto <Dto.TestDtos.TestDto>(EfContent.Where <Domain.Domains.Tests.Test1>(p => p.HelloWorld == "你好世界").FirstOrDefault())); }