the update-database partially works, I mean, the schema is being created when I look on the mysql workbench, but the tables from the model was not created, the only table created was efmigrationhistory. any thoughts on this @mikeTheLiar ?
Hi here.
I'm wondering if this is a correct if statement:
else if (l[current_line+1, loop_word].Visible == false)
{
for (int i = 0; i < 5; i++)
{
current_line++;
l[current_line, i].Visible = true;
Refresh();
loop_word = 0;
current_letter = 0;
@Donovan because you say "if a loop word in a current_line+1 is not visible do this thing" and not "if a loop word in a current_line+1 being visible is false do this thing"
No, i am confused why (But the next labels don't show up.)
Did you make it like this: for (int i = 0; i < 5; i++) { current_line++; l[current_line, i].Visible = true; loop_word = 0; current_letter = 0; } Refresh();
i'm not used to using this chat yet :D accidentaly deleted previous post. Thing is, in the method you set all appearance settings (Visible for example) and only call Refresh one time
This is definition of programming - you look at 1 very simple line of code, everything looks good but is doesn't work :D Or even worse, when everything works, but you find a bug and you don't know how it is working properly :D
Hey, I need a suggestion I have a view model which needs to be entered into the database. Is there a way I can map my view model to my model without mapping each element of the view model to those in the model?
You can also try for every if/else branch to create separate method and move code there. So at the end code is easier to read, since you have only if/else statements : if (a) method1(); else method2();
public override IQueryable<T> GetAll()
{
var result = base.GetAll();
if (typeof(T).GetInterfaces().Contains(typeof(IAmRoleSecured<Role>)))
result = result.Where(i => ((IAmRoleSecured<Role>)i).Roles.Any(r => User.Roles.Contains(r)));
return result;
}
anyone got any ideas how I can do this without the cast
base.GetAll() returns an IQueryable<T> (obviously)