コード例 #1
0
		public IQueryable<Model.Feature> InsertFeature(Model.Feature feature)
		{
			int newId;

			//using (ScutexEntities db1 = new ScutexEntities())
			//{
			Feature feat = new Feature();

			Mapper.CreateMap<Model.Feature, Feature>();
			feat = Mapper.Map<Model.Feature, Feature>(feature);

			db.AddToFeatures(feat);
			db.SaveChanges();

			newId = feat.FeatureId;
			//}

			return GetFeatureById(newId);
		}
コード例 #2
0
ファイル: DB.Designer.cs プロジェクト: staxmanade/Scutex
 /// <summary>
 /// Create a new Feature object.
 /// </summary>
 /// <param name="featureId">Initial value of the FeatureId property.</param>
 /// <param name="productId">Initial value of the ProductId property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="uniquePad">Initial value of the UniquePad property.</param>
 public static Feature CreateFeature(global::System.Int32 featureId, global::System.Int32 productId, global::System.String name, global::System.Guid uniquePad)
 {
     Feature feature = new Feature();
     feature.FeatureId = featureId;
     feature.ProductId = productId;
     feature.Name = name;
     feature.UniquePad = uniquePad;
     return feature;
 }
コード例 #3
0
ファイル: DB.Designer.cs プロジェクト: staxmanade/Scutex
 /// <summary>
 /// Deprecated Method for adding a new object to the Features EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToFeatures(Feature feature)
 {
     base.AddObject("Features", feature);
 }