// Insert a new method public METHOD InsertMETHODS(int idclass, string tenmethod, int startline, int endline) { var newItem = new METHOD { IDClass = idclass, TenMethod = tenmethod, StartLine = startline, EndLine = endline }; return _repMETHODS.Insert(newItem) ? newItem : null; }
/// <summary> /// Create a new METHOD object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="iDClass">Initial value of the IDClass property.</param> public static METHOD CreateMETHOD(global::System.Int32 id, global::System.Int32 iDClass) { METHOD mETHOD = new METHOD(); mETHOD.ID = id; mETHOD.IDClass = iDClass; return mETHOD; }
/// <summary> /// Deprecated Method for adding a new object to the METHODS EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToMETHODS(METHOD mETHOD) { base.AddObject("METHODS", mETHOD); }
public MethodStructure BuildMethod(METHOD method) { var require = method.REQUIRES.FirstOrDefault(item => item.IDMethod == method.ID) != null ? method.REQUIRES.FirstOrDefault(item => item.IDMethod == method.ID).NoiDung : null; var ensure = method.REQUIRES.FirstOrDefault(item => item.IDMethod == method.ID) != null ? method.REQUIRES.FirstOrDefault(item => item.IDMethod == method.ID).NoiDung : null; var methodStr = new MethodStructure { Name = method.TenMethod, Require = require, Ensure = ensure, LstPreCondition = require != null ? MethodStructure.InitRequires(require) : null, LstPosCondition = ensure != null ? MethodStructure.InitEnsure(ensure) : null, StartLine = method.StartLine.Value, EndLine = method.EndLine.Value }; return methodStr; }