public UnitofWork(ApplicationDbContext dbContext) { applicationDbContext = dbContext; Questions = new QuestionsRepository(applicationDbContext); Tags = new TagsRepository(applicationDbContext); Answers = new AnswersRepository(applicationDbContext); }
public UnitOfWork(ApplicationDbContext dbContext, IConfiguration configuration) { applicationDbContext = dbContext; Questions = new QuestionsRepository(applicationDbContext); Tags = new TagsRepository(applicationDbContext); Answers = new AnswersRepository(applicationDbContext); StoredProcedure = new StoredProcedureExecution(applicationDbContext, configuration); }
//Constructor public SurveyBusiness(IUser userDAL, ISurvey surveyDAL, IQuestion questionDAL, ITextAnswers textAnswerDAL, IOptionChoice optionChoiceDAL, IAnswers answerDAL, IInputType inputTypeDAL) { this.userDAL = userDAL; this.surveyDAL = surveyDAL; this.questionDAL = questionDAL; this.textAswersDAL = textAnswerDAL; this.optionChoiceDAL = optionChoiceDAL; this.answerDAL = answerDAL; this.inputTypeDAL = inputTypeDAL; }
public static void Initialize(this IAnswers answers, Context context) { if (_initialized) { return; } lock (InitializeLock) { if (_initialized) { return; } Fabric.Instance.Kits.Add(answers); _initialized = true; } }
public static void Initialize(this IAnswers answers, Context context) { if (_initialized) { return; } lock (InitializeLock) { if (_initialized) { return; } var native = (Bindings.AnswersKit.Answers)answers.ToNative(); Bindings.FabricSdk.Fabric.With(new Bindings.FabricSdk.Fabric.Builder(context) .Kits(native) .Debuggable(Fabric.Instance.Debug) .Build()); _initialized = true; } }
public AnswerClient() { _baseResponse = Substitute.For <BaseResponse <Answer> >(); _answers = Substitute.For <IAnswers>(); _answerFilters = Substitute.For <AnswerFilters>(); }