protected override IComondModul <IMyEntity> СommandStart(IComondModul <IMyEntity> comond) { if (comond.Action == TypeComond.Get) { IEnumerable <IMyEntity> user = mainContext.GetEntity(comond.TypeModel); comond.SetAnswer(user); } else if (comond.Action == TypeComond.Сreate) { IMyEntity ответ = mainContext.CreatEntity(comond.TypeModel); IList <IMyEntity> user = new List <IMyEntity> { ответ }; comond.SetAnswer(user); } else if (comond.Action == TypeComond.Remove) { mainContext.RemoveEntity(comond.Data); comond.SetAnswer(comond.Data); } else if (comond.Action == TypeComond.Save) { mainContext.SaveChangesAsync(); } else if (comond.Action == TypeComond.GetTable) { comond.Metadata = mainContext.GetTable(); } return(comond); }